5
4
I installed Python 2.7 on my Mac. When typing "python" in terminal, it shows:
$ python
Python 2.7 (r27:82508, Jul 3 2010, 20:17:05)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
The Python version is correct here.
But when I try to easy_install some modules. The system will install the modules with python version 2.6 which are not able be imported to Python 2.7. And of course I can not do the functions I need in my code. Here's an example of easy_install graphy
:
$ easy_install graphy
Searching for graphy
Reading pypi.python.org/simple/graphy/
Reading http://code.Google.com/p/graphy/
Best match: Graphy 1.0.0
Downloading http://pypi.python.org/packages/source/G/Graphy/Graphy- 1.0.0.tar.gz#md5=390b4f9194d81d0590abac90c8b717e0
Processing Graphy-1.0.0.tar.gz
Running Graphy-1.0.0/setup.py -q bdist_egg --dist-dir /var/folders/fH/fHwdy4WtHZOBytkg1nOv9E+++TI/-Tmp-/easy_install-cFL53r/Graphy-1.0.0/egg-dist-tmp-YtDCZU
warning: no files found matching '*.tmpl' under directory 'graphy'
warning: no files found matching '*.txt' under directory 'graphy'
warning: no files found matching '*.h' under directory 'graphy'
warning: no previously-included files matching '*.pyc' found under directory '.'
warning: no previously-included files matching '*~' found under directory '.'
warning: no previously-included files matching '*.aux' found under directory '.'
zip_safe flag not set; analyzing archive contents...
graphy.all_tests: module references __file__
Adding Graphy 1.0.0 to easy-install.pth file
Installed /Library/Python/2.6/site-packages/Graphy-1.0.0-py2.6.egg
Processing dependencies for graphy
Finished processing dependencies for graphy
So it installs graphy for Python 2.6.
Can someone help me with it? I just want to set my default easy_install
Python version to 2.7.
1What happens when you type
which python
andwhich easy_install
? How did you install Python 2.7, how did you installeasy_install
? – Daniel Beck – 2011-03-12T16:20:04.960Ma-Xiaolongs-MacBook-Pro-2:~ MaXiaolong$ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python Ma-Xiaolongs-MacBook-Pro-2:~ MaXiaolong$ which easy_install /usr/bin/easy_install – user73250 – 2011-03-13T03:55:07.443
I just download the python 2.7 and install the python. But I have no idea how I installed easy_install.. I thought it comes with python.. I'm new to python, sorry about that. Can you help me to think about how to fix the problem? Really appreciate it. – user73250 – 2011-03-13T03:57:26.007