3

I have a really strange issue with the behavior of pip in a virtualenv.

I have set

export PIP_REQUIRE_VIRTUALENV=true
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
export VIRTUALENV_DISTRIBUTE=true

Now, when I'm in my virtualenv and want to install my dependencies:

pip install -r requirements/_base.txt

(for testing purposes, requirements/_base.txt only contains:)

Django==1.5

Anyway, when I try to install it, I only get:

Downloading/unpacking Django==1.5 (from -r requirements/_base.txt (line 1))
Running setup.py egg_info for package Django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'

And after that, Django is not installed.

Here comes the strange part: When I install Django manually with

pip install Django==1.5

it's working perfectly (though the same two warnings appear):

Downloading/unpacking Django==1.5
Running setup.py egg_info for package Django

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Installing collected packages: Django
Running setup.py install for Django
changing mode of build/scripts-2.7/django-admin.py from 644 to 755

warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
changing mode of /usr/local/share/python/django-admin.py to 755
Successfully installed Django
Cleaning up...
Lukas Klein
  • 151
  • 5

2 Answers2

0

I faced a similar problem and realized that removing the version requirement solved the problem. Don't know why though...

F3RD3F
  • 2,309
  • 3
  • 22
  • 26
0

I figured out why this was happening to me, which may also solve the problem for others who see this page. For me, the problem was that I had a requirement that can not install automatically via pip. The pip freeze exported the package name and version but, for whatever reason, pip cannot install that package directly in a requirements install. I have to instead install it manually from a zip file.

The problem you might be experiencing, then, is that you have a requirement which cannot be installed by pip's requirements installer. Check your output log for red text, errors, that sort of thing.

I figured this out using this post: pip fails to install packages from requirements.txt

Community
  • 1
  • 1
melchoir55
  • 6,842
  • 7
  • 60
  • 106