why idle in virtualenv keeps using system one?
I have create a local python installation in ~/localpython/python276 After create a virtualenv as py276, I linked the idle to ~/localpython/python276 /bin/idle
. I also activated the py276.
$ which python
/home/xxx/virtualenvs/py276/bin/python
$ python
Python 2.7.6
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
$ bin/idle
Python 2.7.6
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
All things seems correct. However, if I just use idle
as command, it will still use system one, which does not make any sense because which idle
returns the correct result.
$ which idle
/home/xxx/virtualenvs/py276/bin/idle
$ idle
Python 2.7.3
[GCC 4.6.3] on linux2
Type "copyright", "credits" or "license()" for more information.
any idea why this is happening?
This is probably because idle
typed alone on the command line is actually a symbolic link to the 2.7.3 installed version. You must either change the symbolic link or be more explicit with your command.
Symbolic Link(symlink) Definition.
How to symlink a file.
链接地址: http://www.djcxy.com/p/78092.html上一篇: 符号链接:当前目录