开发者

python 3.2 installed, but MAC didn't recognize it

I installed python 3.2 edition, but when I opened wingIDE, my MAC still only show the old edition phthon 2.6.1. I tried to use "configure python"-enter python3.2 in "python executable", then found nothing changed, python 2.6.1 still appeared in wingIDE. Any suggestion?


I just tried to launch WINGIDE 开发者_JS百科again and this time it indicates the python 3.2, the newest edition i installed. hmmmm, funny, i didn't change anything and it recognized it now! But when i use terminal, it still only recognize python 2.6.


Is python3.2 in your PATH? Try typing "python3.2" at the command line and see if that works. Where is python3.2 located? It's probably /usr/bin/python3.2 Try using that in WingIDE and see if that works.


This may depend on the version of OSX you are running. I did a custom install of python 2.7 on my machine running 10.6.7 and had to modify ~/.bash_profile with the following line:

PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"

You may want to check the directory /Library/Frameworks/Python.framework/Versions and see what the full path is to your 3.2 install. You could then modify the PATH variable in your ~/.bash_profile like this:

PATH="/Library/Frameworks/Python.framework/Versions/YOUR_VERSION_NUM/bin:${PATH}"


trying to fix wing myself, but if you want to just execute it via commandline...

in terminal: python3.2 ./filename.py

enjoy


The reason is because the "python" shortcut doesn't exist in "/Library/Frameworks/Python.framework/Versions/3.4/bin", which is the newly created binary location. Create a soft link to "python" as a work around. "ln -s python python3.4". Also, make sure that your .bash_profile has an entry for /Library/Frameworks/Python.framework/Versions/3.4/bin directory. Verify with "Python -V"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜