gpt4 book ai didi

python - Pip 无效命令 Egg_info

转载 作者:太空宇宙 更新时间:2023-11-03 17:47:06 26 4
gpt4 key购买 nike

我最近升级了 pip,它破坏了一些东西。

我尝试运行这个:

    sudo pip install -U ipython pyzmq
Requirement already up-to-date: ipython in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Downloading/unpacking pyzmq
Downloading pyzmq-14.5.0.tar.gz (997kB): 997kB downloaded
Running setup.py (path:/private/tmp/pip_build_root/pyzmq/setup.py) egg_info for package pyzmq
usage info....


error: invalid command 'egg_info'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/pyzmq
Storing debug log for failure in /Users/asselinpaul/.pip/pip.log
➜ ~ pip show setuptools
---
Name: setuptools
Version: 15.0
Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg
Requires:

更多信息:

    ➜  ~  which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
➜ ~ which pip
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip

奇怪的是,setuptools 未找到但已安装。

    ➜  ~  which setuptools
setuptools not found

➜ ~ sudo pip install -U setuptools
Password:
Requirement already up-to-date: setuptools in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-15.0-py2.7.egg
Cleaning up...

最佳答案

我也遇到了和你一样的问题(也在 Mac 上)。我删除了(rm -r)来自 ~/env-backend/backend/lib/python2.7/site-packages 中包含 setuptools 的所有文件和文件夹( ls | grep 设置)。

然后我使用python.org中的curl指令安装了setuptools (>curl https://bootstrap.pypa.io/ez_setup.py -o - | python)此后对我来说效果很好。

关于python - Pip 无效命令 Egg_info,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29631880/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com