[英]How to install virtualenv on Centos6?
I want to apply my Flask project on my workplace Centos6.我想在我的工作场所 Centos6 上应用我的 Flask 项目。 So I followed guide from google to install pip, virtualenv, and flask, but I cannot successfully install either pip or virtualenv.
所以我按照google的指南安装了pip、virtualenv和flask,但我无法成功安装pip或virtualenv。
What I have done is this:我所做的是这样的:
1) http://sharadchhetri.com/2014/05/30/install-pip-centos-rhel-ubuntu-debian/ 1) http://sharadchhetri.com/2014/05/30/install-pip-centos-rhel-ubuntu-debian/
#rpm -ivh httplink://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#yum install -y python-pip
(version 7.1.0-1.el6)
#pip install virtualenv
this gives这给
urllib3 will issue (InsecurePlatformWarning)
urllib3 将发出 (InsecurePlatformWarning)
2) https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 2) https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
#curl httplink://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python2.7 -
this gives这给
curl: (77) Problem with the SSL CA cert (path? access rights?)
curl: (77) SSL CA 证书问题(路径?访问权限?)
3) http://www.ylabs.co.kr/index.php?document_srl=31854&mid=board_dev_python&order_type=asc&sort_index=title 3) http://www.ylabs.co.kr/index.php?document_srl=31854&mid=board_dev_python&order_type=asc&sort_index=title
with python2.7使用 python2.7
#cd /tmp
#wget --no-check-certificate httplink://pypi.python.org/packages/source/s/setuptools/setuptools-1.4.2.tar.gz
#tar -xvf setuptools-1.4.2.tar.gz
#cd setuptools-1.4.2
#python2.7 setup.py install
This gives这给
Searching for pip
Reading httplink://pypi.python.org/simple/pip/
Download error on httplink://pypi.python.org/simple/pip/: [Errno 0] _ssl.c:343: error:00000000:lib(0):func(0):reason(0) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading httplink://pypi.python.org/simple/
Download error on httplink://pypi.python.org/simple/: [Errno 0] _ssl.c:343: error:00000000:lib(0):func(0):reason(0) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
4) http://novafactory.net/archives/3074 4) http://novafactory.net/archives/3074
# wget httplink://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
# python3.4 ez_setup.py
# easy_install-3.4 pip
# pip3.4 install virtualenv
This gives这给
Downloading/unpacking virtualenv
Cannot fetch index base URL httplink://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement virtualenv
Cleaning up...
No distributions at all found for virtualenv
Storing debug log for failure in /root/.pip/pip.log
My system is CentOS release 6.8 (Final), python 2.6/2.7/3.4我的系统是 CentOS release 6.8 (Final), python 2.6/2.7/3.4
pip3 -V :
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)
pip2 -V :
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)
Thankyou for the advices谢谢你的建议
what I have done is to not use pip, instead I just download python module packages.我所做的是不使用 pip,而是下载 python 模块包。
I went to the link http://pypi.python.org/simple/ which I got from error message from above (my 3 trial)我转到了链接http://pypi.python.org/simple/ ,这是我从上面的错误消息中得到的(我的 3 次试用)
and download [package] what I looked for并下载 [package] 我要找的东西
and tar -xvf [package]和 tar -xvf [包]
cd [package] cd [包]
[python setup install] [python设置安装]
So I could install Flask and virtualenv without using pip所以我可以在不使用 pip 的情况下安装 Flask 和 virtualenv
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.