通过pip安装egg

11

我可以通过以下方式成功安装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?


11
pip install可以安装sdist或wheel包,但不能安装egg包。在pip和wheel的世界中,egg现在已经是一种过时的格式,应该用wheel来替代它。 - undefined
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接