Forums

no pip with pyvenv-3.4

I am having troubles getting pip into a 3.4 venv, not sure why its not showing up, any ideas?

seems ok on local 3.4 . below is output from ensurepip

env3/bin/python -m ensurepip
Ignoring indexes: https://pypi.python.org/simple/
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./env3/local/lib/python3.4/dist-packages
Requirement already satisfied (use --upgrade to upgrade): pip in ./env3/local/lib/python3.4/dist-packages
Cleaning up...

so it thinks it's there, just no pip in bin.

Looks like there's something screwy with our Python 3.4 installation when it comes to virtualenvs. We'll have to investigate and try to work out what's going on and how to fix it.

After some investigation, it looks like pip is installed and useable. It's just hidden in (in your case) env3/local/bin and that is not on the path for the activated venv. It works from that location and installs stuff fine, it's just a bit hard to get to.

I'm trying to work out why it gets installed there, but that's led me on a pretty deep code dive into the pip source and I'm not sure where that will lead.

Some further experimentation:

python3.4 -m venv env_name --without-pip
source env_name/bin/activate
python3.4 -m ensurepip

produces a virtualenv with pip in the right place.

Nice work Glenn, thanks for the workaround. :D