Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing distribution spec error using pip install from requirements

I have just created a fresh virtualenv into which I want to run my pip install. However, I'm getting this error:

raise ValueError("Missing distribution spec", line)
ValueError: ('Missing distribution spec', '/path/to/dir/requirements.txt')

My requirements.txt:

Django==1.3
Jinja2==2.6
MySQL-python==1.2.3
PIL==1.1.7
Pygments==1.5
Sphinx==1.1.3
Werkzeug==0.8.3
django-debug-toolbar==0.9.4
django-excel-response==1.0
django-extensions==0.8
docutils==0.9.1
ipython==0.12
wsgiref==0.1.2

What is going wrong?

like image 829
Darwin Tech Avatar asked Jul 19 '12 18:07

Darwin Tech


3 Answers

You must be doing something wrong. Something like: pip install path/to/requirements.txt, but the requirements file must be passed with -r argument:

pip install -r path/to/requirements.txt

Hugs.

like image 61
Vinicius Cainelli Avatar answered Nov 07 '22 17:11

Vinicius Cainelli


I'd like to complete the answer if anyone runs in the same variant as I did: I was running everything on a Windows environment (windows 7). Under powershell, I had ran

pip freeze > requirements.txt

When I tested on a new virtualenv, I had the same error as above. The problem was an encoding issue (ugh): make sure the requirements.txt file is written in UTF-8 (without BOM). Notepad++ or sublime text can make sure of that.

Hope it helps anyone else for the which the answer above was not enough.

like image 35
Justmaker Avatar answered Nov 07 '22 16:11

Justmaker


My issue ending up being that in some terminals, – and - look exactly the same. I had –r and it threw this error. You want -r.

like image 2
holl Avatar answered Nov 07 '22 17:11

holl