通过pip安装egg

问题描述 投票:0回答:1

我可以通过

成功为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?

python-3.x pip easy-install egg
1个回答
0
投票

幸运的是,您提到的软件包现已包含在 PyPI 中:morfeusz2 · PyPI。 然而,也建议链接到 GitHub 存储库(或类似的东西),尽管遗憾的是它不在任何 VCS 网站上,但您可以考虑在其官方网站上添加链接,例如:

http://download.sgjp.pl/morfeusz/20231112/Windows/64/morfeusz2-1.99.7-20231112-cp311-cp311-win_amd64.whl

(对于 Windows 和 Cpython 3.11,如前所述)

希望这能解决您的问题,

© www.soinside.com 2019 - 2024. All rights reserved.