When downloading the python 2.7.5 here , I download the python installer with the link "Python 2.7.5 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and later [2])". Installed the python, I cd the directory "/Library/Frameworks/Python.framework/Versions/2.7" and execute the following python code:
import sys
print sys.maxint
and I get 2147483647 which means I am runing the python of 32bit version. How can I install the python of 64bit version?
Make sure you are really running the Python you think you are. cd /Library/Frameworks/Python.framework/Versions/2.7
doesn't help by itself. If you did not change any of the default installer options, /Library/Frameworks/Python.framework/Versions/2.7/bin
should now be first in your shell PATH
(you need to open a new terminal window after installing to see this) and there should now be python
and python2.7
links in /usr/local/bin
to the new Python.
$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
$ python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxsize
9223372036854775807
>>> sys.maxint
9223372036854775807
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.