我怎样才能设置Pythonhome



我是 python3 的新手,我不知道如何在 ubuntu 16.04 中设置 PYTHONHOME。 我试过它显示的 Python 在哪里,如下所示 它显示的这个许多版本。从这里我如何为 python3.x 设置 pythonhome。

sysadmin@localoffice:~$ whereis python
python: /usr/bin/python /usr/bin/python3.5 /usr/bin/python2.7 
/usr/bin/python3.5m-config /usr/bin/pythnfig 
/usr/bin/python3.5m /usr/lib/python3.5 /usr/lib/python2.7 
/etc/python /etc/python3.5 /etc/python2local/lib/python3.5 
/usr/local/lib/python2.7 /usr/include/python3.5 
/usr/include/python3.5m 
/usr/share/usr/share/man/man1/python.1.gz
sysadmin@localoffice:~$ echo ${PYTHONPATH}
sysadmin@localoffice:~$

尝试:

alias python /path/to/your/python/home

例如:

alias python /usr/bin/python2.7 

最新更新