pip3 install scrapy无法正常工作并返回错误代码1 [英] pip3 install scrapy doesn't work and return a error code 1
问题描述
Python 3不是我的默认版本.我要使用它,因为我要使用的toripchanger
软件包仅在Python3下可用.
Python 3 is not my default version. I want to use it, because one the package I want to use toripchanger
is only avaible under Python3.
所以我的pip3
版本是:
C:\Users\Truc>pip3 -V
pip 19.0.2 from c:\python\python37\lib\site-packages\pip (python 3.7)
当我运行命令时
C:\Users\Truc>pip3 install scrapy
... #a lot of lines
#then
Command "c:\python\python37\python.exe -u -c "import setuptools, tokenize;
__file__='C:\\Users\\Truc\\AppData\\Local\\Temp\\pip-install-hw8khaqe\\Twisted\\setup.py';
f=getattr(tokenize, 'open',open(__file__);
code=f.read().replace('\r\n','\n');
f.close();
exec(compile(code, __file__, 'exec'))" install
--record C:\Users\Truc\AppData\Local\Temp\pip-record-msw6xh4l\install-record.txt
--single-version-externally-managed
--compile"
failed with error code 1 in C:\Users\Truc\AppData\Local\Temp\pip-install-hw8khaqe\Twisted\
我已经尝试过了
pip3 install setuptools
还有这个
pip3 install wheel
因为我在另一个主题中看到了这一点,但是它不起作用,并且出现了相同的错误.
because I saw that in another topic, but it does not work and I get the same error.
推荐答案
听起来好像您没有构建扭曲轮的要求.
我知道可以肯定的是,在Windows上为python编译任何内容都需要 Visual C ++生成工具,安装这些文件可能足以使您的pip命令正常工作.
It sounds like you don't have the requirements for building the twisted wheel.
I know for sure compiling anything for python on windows requires the Visual C++ Build Tools, and installing those might be enough to get your pip command to work.
另一种解决方案是从 https:/下载预构建的/www.lfd.uci.edu/~gohlke/pythonlibs/#twisted 并安装它. (pip3 install file_you_downloaded.whl
)
安装扭曲后,请尝试再次安装scrapy.
Another solution would be to download a pre-built one from https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted and install it. (pip3 install file_you_downloaded.whl
)
Once twisted is installed, try installing scrapy again.
这篇关于pip3 install scrapy无法正常工作并返回错误代码1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!