简体   繁体   English

将 django 从 python2.6 更改为 python2.7

[英]change django from python2.6 to python2.7

I am new Linux (Ubuntu) and Python,my Ubuntu come with python2.6.6 installed in it.I newly install python 2.7, and again installed django. I am new Linux (Ubuntu) and Python,my Ubuntu come with python2.6.6 installed in it.I newly install python 2.7, and again installed django.

I want to configure django with python2.7.我想用python2.7配置django。 But now it configured with python2.6.但现在它配置了python2.6。 I am totally confused since a new Linux user.I expect all your help,Thanks in advance我很困惑,因为一个新的 Linux 用户。我期待你的帮助,在此先感谢

Use virtualenvwrapper.使用 virtualenvwrapper。 To install:安装:

pip install virtualenvwrapper

and then modify your.bashrc as described in http://www.doughellmann.com/docs/virtualenvwrapper/然后按照http://www.doughellmann.com/docs/virtualenvwrapper/中的描述修改 your.bashrc

To use:要使用:

mkvirtualenv ENV_NAME --python=python2.7 --no-site-packages
workon ENV_NAME
pip install whatever packages you need
# or
pip install -r requirement_file.txt

each time you are in you env, the python is 2.7每次你在你的环境中,python 是 2.7

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

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