1

I have installed a local python3.5 on my Debian 8 system as follows, but there is no pip3 installed with it (i can not find pip in any of the installed python directries like site-packages or in the bin/):

Downloaded the source from python.org
made a ~/.local_python directory
cd Download/Python3.5
./configure --prefix=/home/${USER}/.local_python
make
make install

The Python3.5 seems to be installed properly, i can run the interpreter from inside the .local_python and there is no collision with system default pythons (which was my goal). No i can't find an installed pip3 in it to use to install packages like PyQt5 which support only Python versions <= 3.5. Can anyone help?

2 Answers2

2

Adding to the answer by jmd_dk, if you don't know what all dependencies are to be installed for OpenSSL and zlib, Just install these dependencies. These are more than sufficient:

sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libsqlite3-dev

Source:ensurepip failure When I followed the above steps, I got this error:Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS. After installing the above dependencies, all worked like a charm.

Community
  • 1
  • 1
Vishal Gupta
  • 130
  • 1
  • 8
1

Try adding --with-ensurepip=install to your configuration:

./configure --prefix=/home/${USER}/.local_python --with-ensurepip=install

Also, pip needs OpenSSL and zlib on your system. You most probable already have these installed.

jmd_dk
  • 12,125
  • 9
  • 63
  • 94
  • So i should uninstall the python3.5 and install it again, right? Would it be sufficient to remove the .my_local_python/ directory since it has been installed localy or should i do other things to uninstall it? –  Nov 24 '16 at 21:04
  • 1
    Yes, uninstall and install once again. You can just remove everything in the directory (or remove the directory itself and create it again). The Python installation should not have created permanent files outside your `.my_local` directory. – jmd_dk Nov 24 '16 at 21:08
  • i have run the `./configure` with `--with-ensurepip=install` but there still is no pip3 to find in the directories. What i want to do is to use pip3 to install PyQt5 (which support only python version after 3.4), i have made a virtualenv using `pyvenv` of the version 3.5 which i have installed localy. –  Nov 26 '16 at 21:21
  • To test whether pip is installed, try running e.g. `bin/python3 -m pip install numpy` from within your newly installed Python directory. – jmd_dk Nov 26 '16 at 21:34
  • 1
    If pip really is missing, you should check the output of your installation process, e.g. by piping (or using `tee`) the output of `./configure`, `make` and `make install` to files and then search for the word "pip" in these files. Somewhere it will state why it was not able to install pip. – jmd_dk Nov 26 '16 at 21:39