I had my mac osx working fine with python 2.7.10
, and I've installed python3
via brew install python3
.
on my bash_profile
I then create an alias python=python3
.
but when I
>>python3
I got:
Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!
PYTHONPATH is currently: "/usr/local/lib/python2.7/site-packages:"
You should unset PYTHONPATH to fix this.
then I ran brew uninstall python3
, but things did not come to previous configuration, and I couldn't run neither python
versions anymore.
>>python
now gives me:
-bash: python3: command not found
I tried then to brew link python3
, since it appeared to be there, but to no avail.
now, If I which python
, I get:
/usr/local/bin/python
.
how do I fix this mess, minding that I want to keep both 2.7 and 3.5?
ps. my bash_profile now:
export PATH=“/usr/local/bin:/usr/local/sbin:/usr/bin:~/bin:./bin:$PATH"
"export PYTHONPATH="/usr/local/lib/python2.7/site-packages:$PYTHONPATH"