Whenever I run any python2 program or open python interpreter I get the following error.
$~/python> python setup.py
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
ImportError: No module named site
If I fire the following command
$ export PYTHONPATH=/usr/local/lib/python2.7
I get the following error
ImportError: No module named site
I have also tried reinstalling the python using following command
sudo apt-get install --reinstall python
but it dosent help at all.
Thanks in advance.
export PYTHONHOME=/usr/local. Python should be installed in /usr/local on OS X.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.