简体   繁体   English

收集Twisted / Centos 7时,草率安装失败

[英]Scrapy installation fails when collecting Twisted / Centos 7

So guys, I just made a fresh installation of Python 3.6 on Centos 7. Created a virtual environment, when I run pip install scrapy , it starts collecting few other dependencies, but fails when it comes to Twisted without returning any error at all. 伙计们,我刚刚在Centos 7上重新安装了Python 3.6。创建了一个虚拟环境,当我运行pip install scrapy ,它开始收集其他一些依赖项,但是在谈到Twisted时却失败了,却没有返回任何错误。 It just freezes and nothing ever happens. 它只是冻结,什么也没有发生。

Collecting Twisted>=13.1.0 (from scrapy)
  Using cached Twisted-17.9.0.tar.bz2

I've been looking into this error since yesterday, looks like error could be related to Twisted's tar.bz2 extension. 从昨天开始,我一直在研究此错误,看起来该错误可能与Twisted的tar.bz2扩展名有关。 I'm new to linux environment and Python, have successfully installed Scrapy on Windows a few months ago using the same pip install scrapy method. 我是Linux环境和Python的新手,几个月前已使用相同的pip install scrapy方法在Windows上成功安装了Scrapy。 But right now, I have no clue how to proceed. 但是现在,我不知道如何进行。

That's the guide I followed to install Python on Centos7. 这就是我遵循的在Centos7上安装Python的指南。 https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7 https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7

Could someone please point me in the right direction? 有人能指出我正确的方向吗? Could it really be related to Twisted's compression method? 真的可以和Twisted的压缩方法有关吗? If so, how can I find a way around this issue? 如果是这样,我如何找到解决此问题的方法? Huge thanks in advance. 在此先感谢。

Couldn't figure out how to get it extract bz2 , so ended up installing Twisted and its dependencies manually. 无法弄清楚如何提取bz2 ,因此最终手动安装了Twisted及其依赖项。 For future reference; 备查;

  1. Download latest Twisted here 在此处下载最新的Twisted

  2. Extract the file 解压缩文件

  3. cd to twisted/src/Twisted.egg-info 光盘到twisted / src / Twisted.egg-info
  4. Run pip install -r top_level.txt . 运行pip install -r top_level.txt This will install Twisted's dependencies. 这将安装Twisted的依赖项。
  5. python setup.py install
  6. That's it. 而已。 You can now run pip install scrapy . 现在,您可以运行pip install scrapy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM