我可以通过以下方式成功安装morfeusz2的egg:
python -m easy_install http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg
然而,我通过 requirements.txt
定义所有其他依赖项。 我希望它们都以一致的方式定义。 morfeusz2 不在任何 PyPI 存储库中。 我怎样才能以一致的方式为我的项目定义依赖关系呢?
例如,我尝试定义以下 requirements.txt
文件:
django
pint
http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg
然而,当运行pip install -r requirements.txt
时出现错误:
(mealplanner) D:\Projects-intellij\djangoproject\mealplanner>pip install -r requirementx.txt
Collecting http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg (from -r requirementx.txt (line 3))
Downloading http://sgjp.pl/morfeusz/download/20181014/ubuntu-xenial/morfeusz2-0.4.0-py3.7-win-amd64.egg (7.7MB)
100% |████████████████████████████████| 7.7MB 11.4MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\oem\virtualenv\mealplanner\lib\tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\OEM\\AppData\\Local\\Temp\\pip-req-build-xucfpk6m\\setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\OEM\AppData\Local\Temp\pip-req-build-xucfpk6m\
我如何使用pip install安装egg?