我正在尝试用pip安装一些软件包。
但pip安装展开给我
命令“python setup.py egg_info”失败,错误码为1 C:\Users\马可的~ 1 \ AppData \ \ Temp \ pip-build-wa7uco0k \展开\
我怎么解决这个问题?
我正在尝试用pip安装一些软件包。
但pip安装展开给我
命令“python setup.py egg_info”失败,错误码为1 C:\Users\马可的~ 1 \ AppData \ \ Temp \ pip-build-wa7uco0k \展开\
我怎么解决这个问题?
当前回答
下面是一个小指南,解释了我通常是如何在Python + Windows上安装新包的。看起来你正在使用Windows路径,所以这个答案将坚持特定的so:
I never use a system-wide Python installation. I only use virtualenvs, and usually I try to have the latest version of 2.x & 3.x. My first attempt is always doing pip install package_i_want in some of my Visual Studio command prompts. What Visual Studio command prompt? Well, ideally the Visual Studio which matches the one which was used to build Python. For instance, let's say your Python installation says Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32. The version of Visual Studio used to compile Python can be found here, so v1500 means I'd be using vs2008 x64 command prompt If the previous step failed for some reason I just try using easy_install package_i_want If the previous step failed for some reason I go to gohlke website and I check whether my package is available over there. If it's so, I'm lucky, I just download it into my virtualenv and then I just go to that location using a command prompt and I do pip install package_i_want.whl If the previous step didn't succeed I'll just try to build the wheel myself and once it's generated I'll try to install it with pip install package_i_want.whl
现在,如果我们关注你的具体问题,你在安装展开包时遇到了困难。似乎安装它的最快方法是这样做:
git克隆https://github.com/Zulko/unroll CD展开&& python setup.py bdist_wheel 复制生成的unroll-0.1.0-py2-none-any。WHL文件从创建的dist文件夹到您的virtualenv。 PIP install unroll-0.1.0-py2-none-any.whl
这样安装就不会出现任何问题。要检查它是否真的工作,只需登录到Python安装并尝试导入展开,它应该不会报错。
最后一点:这种方法99%的情况下都是有效的,有时候你会发现一些针对Unix或Mac OS X的pip包,在这种情况下,我想获得Windows版本的最好方法是向主要开发人员发布一些问题,或者自己进行一些有趣的移植到Windows(通常是几个小时,如果你运气不好的话):)
其他回答
这是一个依赖问题。
我尝试运行以下命令来帮助我整理依赖关系,在我的情况下,依赖关系是
grpcio
pip3 install --upgrade pip
python3 -m pip install --upgrade setuptools
pip3 install --no-cache-dir --force-reinstall -Iv grpcio==1.36.1
pip3 install pulsar-client==2.7.0
请记住,必须在系统中安装python3。
这意味着pip中的一些包是旧的或没有正确安装。
尝试检查版本,然后升级pip。如果有效,请使用自动删除。 如果pip命令对任何命令始终显示错误或冻结,等等。 最好的解决方案是卸载它或完全删除它。 安装新的pip,然后更新和升级您的系统。 我在这里给出了一个安装pip fresh的解决方案- python:不能打开文件get-pip.py错误2]没有这样的文件或目录
我刚刚在尝试pip install -e时遇到了同样的问题。新的回购。我没有注意到setup.py的内容没有被正确保存,我有效地运行了一个空的setup.py命令。
因此,如果目标包的setup.py为空或格式不正确,您可能会遇到相同的错误消息。
我在新的开发设置中使用virtualenvs(与pipenv一起)时遇到了这个问题。
我只能通过将psycopg2版本从2.6.2升级到2.7.3来解决这个问题。 更多信息请访问https://github.com/psycopg/psycopg2/issues/594
我在Centos 7上使用:
sudo yum install libcurl-devel