简体   繁体   English

在具有多个python版本的CentOS上安装scrapy

[英]Install scrapy on CentOS with multiple python versions

I have a default Python install on the server (version 2.6.6) and installed a 2.7.5 to be able to install Scrapy. 我在服务器(版本2.6.6)上安装了默认的Python,并安装了2.7.5以便能够安装Scrapy。 However, during installation, it seems that Scrapy took the 2.6.6 binaries and libraries. 但是,在安装过程中,Scrapy似乎采用了2.6.6二进制文件和库。 After installation, of course, Scrapy won't run (Scrapy 0.20.0 requires Python 2.7). 安装后,Scrapy当然不会运行(Scrapy 0.20.0需要Python 2.7)。

How do I install Scrapy using the 2.7.5 binaries and libraries. 如何使用2.7.5二进制文件和库安装Scrapy。 I've tried doing a symlink of the python binary to point to python2.7 to no avail. 我尝试做一个python二进制文件的符号链接以指向python2.7无济于事。 Is there a way to define this on pip? 有没有办法在点子上定义这个? For now assume that we can't remove the 2.6.6 copy on the server. 现在,假设我们无法删除服务器上的2.6.6副本。

Thank you. 谢谢。

If the issue is pip is still installing packages to your Python 2.6.6 installation, try reinstalling pip for your Python 2.7.5 installation. 如果问题是pip仍在将软件包安装到Python 2.6.6安装中,请尝试为Python 2.7.5安装重新安装pip。

If which python points to your new installation try the instructions here: http://www.pip-installer.org/en/latest/installing.html#install-or-upgrade-pip 如果which python指向您的新安装,请尝试以下说明: http : //www.pip-installer.org/en/latest/installing.html#install-or-upgrade-pip

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

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