Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've been trying to replicate your problem but with no luck. </p> <p>Activating virtualenv leaves me with a prompt like this:</p> <pre><code>jeff@DeepThought:~$ source ~/ENV/bin/activate (ENV)jeff@DeepThought:~$ </code></pre> <p>Mostly what this is doing is adding the ~/ENV/bin to the front of the search path so when I type "python" the version I have installed in that bin comes up first. In my case, I have 2.6 installed globally and 2.7 installed virtually.</p> <pre><code>(ENV)jeff@DeepThought:~$ python Python 2.7 (r27:82500, Sep 8 2010, 20:09:26) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; </code></pre> <p>What I find strange about your case is that you say you have your updated libraries in the virtual environment, but you are only able to access them with python2.6. Unless you have created it on your own, ~/ENV/bin should not even have a python2.6 executable. If you have activated virtualenv, typing python should bring you to the virtualenv python shell and typing python2.6 would bring you to the global python shell. If that were the case, you should be seeing the opposite of what you say is happening.</p> <p>The first thing I would do is check out what is being executed when you run python and python2.6:</p> <pre><code>(ENV)jeff@DeepThought:~$ which python /home/jeff/ENV/bin/python (ENV)jeff@DeepThought:~$ which python2.6 /usr/bin/python2.6 </code></pre> <p>This looks how I would expect it to. What does yours look like? If yours also looks like that, maybe you need to just go into ~/ENV/lib/python2.6/site-packages/ and remove the files that are giving you trouble, replacing them with the updated files.</p> <p>EDIT: alias takes priority over search path:</p> <pre><code>jeff@DeepThought:~$ echo $PATH /home/jeff/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games jeff@DeepThought:~$ cat &gt; /home/jeff/bin/hello.sh #!/bin/bash echo "hello world" jeff@DeepThought:~$ chmod +x ~/bin/hello.sh jeff@DeepThought:~$ hello.sh hello world jeff@DeepThought:~$ which hello.sh /home/jeff/bin/hello.sh jeff@DeepThought:~$ alias hello.sh=/usr/bin/python jeff@DeepThought:~$ which hello.sh /home/jeff/bin/hello.sh jeff@DeepThought:~$ hello.sh Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload