简体   繁体   English

无法在CentOS服务器上安装Twisted

[英]Unable to install Twisted on CentOS server

I've been searching the web for ways to solve this issue but nothing works. 我一直在网上寻找解决此问题的方法,但没有任何效果。 I have a web server with CentOS 6.7 and I've successfully installed python 2.7.10 on it (it comes with version 2.6.6) 我有一个带有CentOS 6.7的Web服务器,并且已经在其上成功安装了python 2.7.10(版本2.6.6随附)。

I followed up to step two in this site: https://cpaneltips.com/install-python-2-7-python-3-x-centos-cpanel/ 我在该网站上继续进行第二步: https//cpaneltips.com/install-python-2-7-python-3-x-centos-cpanel/

I then installed virtualenv (using pip) and created another directory called "news" 然后,我安装了virtualenv(使用pip)并创建了另一个名为“新闻”的目录。

Installed virtualenv and activated it so I have a python 2.7.10 environment. 安装了virtualenv并激活了它,所以我有一个python 2.7.10环境。 I ran "pip install scrapy" 我跑了“ pip install scrapy”

But I have been getting this frustrating error: Could not find a version that satisfies the requirement Twisted>=10.0.0 (from scrapy) (from versions: ) 但是我遇到了一个令人沮丧的错误:找不到满足Twisted> = 10.0.0要求的版本(来自scrapy)(来自版本:)

Some externally hosted files were ignored as access to them may be unreliable (use --allow-external Twisted to allow). 一些外部托管的文件被忽略,因为对它们的访问可能不可靠(请使用--allow-external Twisted允许)。 No matching distribution found for Twisted>=10.0.0 (from scrapy) 找不到Twisted> = 10.0.0的匹配分布(来自scrapy)

I then ran "pip install --allow-external scrapy scrapy" 然后,我运行了“ pip install --allow-external scrapy scrapy”

still doesn't work... What am I missing? 仍然不起作用...我想念什么?

wget https://pypi.python.org/packages/source/T/Twisted/Twisted14.0.0.tar.bz2#md5=9625c094e0a18da77faa4627b98c9815 --no-check-certificate
tar -vxjf Twisted-14.0.0.tar.bz2
cd Twisted-14.0.0
python setup.py install

pip install scrapy

It's clear you need twisted, you can firstly install twisted in your virtualenv: 很明显,您需要扭绞,您可以首先在您的virtualenv中安装扭绞:

pip install twisted

and then install scrapy: 然后安装scrapy:

pip install scrapy

This worked for me: 这对我有用:

wget https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2
tar -vxjf Twisted-18.4.0.tar.bz2
cd Twisted-18.4.0
python setup.py install
pip install scrapy

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

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