简体   繁体   中英

Problems with easy_install --upgrade pytz

easy_install was good and very helpful. I have been using it. However, I found it unfunctioning today.

error msg:

#easy_install --upgrade pytz
-bash: /usr/local/bin/easy_install: /usr/bin/python2.6: bad interpreter: No such file or directory

I think it is caused by my reinstallation of python and the one I am using is python2.7

So, how can I fix this problem

Thanks

Open /usr/local/bin/easy_install in a text editor and examine the first line; you'll probably see something like this:

 #!/usr/bin/python2.6

This shebang line tells the kernel which command it should execute to evaluate the script body. The error message indicates that /usr/bin/python2.6 is missing.

To fix this and get a working easy_install script, at a minimum you'll need to install distribute using your Python 2.7 interpreter and reinstall the packages you depend on (eg pytz ).

easy_install is associated with a particular Python instance. Each Python instance needs to have its own copy. Thus you need to install a new version of easy_install for python2.7. It is supplied by either the traditional setuptools project or the more actively maintained Distribute project. Follow the installation instructions for either one.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM