issues with python virtual environment
<p><br>
I am facing following 2 issues:<br></p>

<ol>
<li>python command is not using the virtualenvwrapper python.<br>
After activating my virtual environment if I type python then the code still uses the native python libraries. I can easily install libraries etc with pip to my virtual environment but I cannot run any command using python.<br>
e.g. if I execute <br><b>$ ./manage.py runserver</b><br>then it is fine and I can run a django server <br>
but if I try <br><b>$ python manage.py runserver</b><br>
or even just<br>
<b>$ python</b><br>
then it uses the native python libraries and that should not happen<br></li>
</ol>

<p>This is while using iterm or terminal in osx. I have never faced this problem in any linux based os</p>

<ol start="2">
<li>While using any os (linux based or osx), the <b>workon</b> command doesn't work inside any shell script, while it works normally in a terminal<br></li>
</ol>

<p>os: osx</p>

<ol>
<li><p>sounds like Python might be using the packages in site-packages, which means you should use the <code>--no-site-packages</code> flag when creating your virtualenv (although it seems like <a href="https://virtualenv.pypa.io/en/stable/reference/#cmdoption--no-site-packages" rel="nofollow">this is the default</a> in the current version of virtualenv).</p></li>
<li><p>In order to access the <code>virtualenvwrapper</code> functions from a shell script, you will first need to <code>source</code> it: <code>$ source /usr/local/bin/virtualenvwrapper.sh</code> (the path might be different in your case).</p></li>
</ol>

python linux django osx