On 24.12.2013 20:15, Lolo Lolo wrote:
ive struggled all day to install pip on ubuntu 12.04 for python 3.3 .
The only pip in the apt-get cache is for python 2. i tried to download
pip from source but setuptools is missing when it tries to import it.
This made me download setuptools with apt-get but the version there is
only for python 3.2 I've also download the distribute_setup.py file to
get pip through easy_install but it returns errors when it uses
urllib.request. Something to do with https, although the same
distribute_setup.py worked perfectly when i used it on windows for 3.1
and 3.3.
I guess I just had the same problem.
Is this the error you get when executing distribute_setup.py?
urllib.error.URLError: <urlopen error unknown url type: https>
If yes, Python3.3 is missing ssl support. You can build python from
source to get ssl support. Before doing so, you must make sure ssl is
installed on your system:
sudo apt-get install libssl-dev
Then you download the python sources and do:
./configure --prefix=<prefix>
where <prefix> is a custom path (e.g. in your home directory) where you
want to install python. You can configure without the --prefix option,
but if you just want to use this python installation for virtuelenvs I
would install it separate from the rest of the system.
Then you can build and install Python:
make
make install
Note that after the first make a list of modules that were not build is
displayed. '_ssl' should NOT be listed.
Then you can create a virtualenv with your custom python build and
should be able to install easy_install with distribute_setup.py:
<prefix>/bin/pyvenv ~/my_venv
source ~/my_venv/bin/activate
wget python-distribute.org/distribute_setup.py
python distribute_setup.py
I don't know if there is a better way to get a virtual environment with
python3.3 and ssl support in Ubuntu, but this worked for me :)
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor