In my AWS Ubuntu 14.04 instance, I just did pip freeze > requirements.txtthat gave me a file that also includes the following two lines:
python-apt===0.9.3.5ubuntu2
python-debian===0.1.21-nmu2ubuntu2
When I use this file to create pip install -r requirements.txton another AWS Ubuntu 14.04 instance, I get the following trace:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 262, in run
for req in parse_requirements(filename, finder=finder, options=options, session=session):
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1632, in parse_requirements
req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 173, in from_line
return cls(req, comes_from, url=url, prereleases=prereleases)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 71, in __init__
req = pkg_resources.Requirement.parse(req)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2667, in parse
reqs = list(parse_requirements(s))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2605, in parse_requirements
line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2573, in scan_list
raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'python-apt===0.9.3.5ubuntu2', 'at', '0.9.3.5ubuntu2')
Interesting about two things here:
- Why
pip freezeuses ubuntu2at the end of the version? - Why
pip freezeuses ===instead ==?
[EDIT]
And one more question:
- Why does pip on another computer not accept
===and ubuntu2(I tried both separately)?