pip3.5 install getting variables from else where causing bad interpreter error
<p>I have many versions of <code>python</code> and also <code>pip</code> and <code>pip3.5</code> in </p>

<pre><code>$ pwd
/home/bli1/py/python3.5/bin
</code></pre>

<p>In my <code>.bashrc</code> I have:</p>

<p><code>export PATH=${HOME}/py/python3.5/bin:$PATH</code></p>

<p>I can run <code>python3.5</code> fine</p>

<pre><code>$ python3.5
Python 3.5.1 (default, Mar  1 2016, 10:49:42) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
</code></pre>

<p>But when I want to run <code>pip3.5 --no-cache-dir install -U ...</code> I get:</p>

<pre><code>$ pip3 --no-cache-dir install -U trin-py3-none-any.whl
-bash: /home/bli1/py/python3.5/bin/pip3: /home/sys_bio_ctgcs/sthe-admin/python3.5/bin/python3.5: bad interpreter: No such file or directory
</code></pre>

<p>I'm not sure where <code>/home/sys_bio_ctgcs/sthe-admin/python3.5/bin/python3.5</code> comes from. I took this code from someone else so I might've taken other things that I am not aware of.</p>

<p>It seems like you've copied Python binaries from another machine.</p>

<p>Python script endpoints contains shebangs that points to interpreter version which should be used by given script. </p>

<p>You may verify shebang used by <code>pip3.5</code> those by running <code>cat $(which pip3.5)</code> in shell. If path to binary in first line does not match path to your interpreter, installation is broken. You may possibly fix it by updating all of bash scripts and changing shebang paths in them.</p>

<p>Sample from my machine:</p>

<pre><code>mac-mini:~ rogalski$ cat $(which pip3.5)
#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5

# -*- coding: utf-8 -*-
import re
import sys

from pip import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
mac-mini:~ rogalski$ 
</code></pre>

<p><code>#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5</code> should point to valid interpreter. In your case it seems it does not.</p>

python bash python-wheel