Directing PyCharm to Python 3.3 interpreter?

前端 未结 2 678
渐次进展
渐次进展 2021-01-31 10:35

I\'m not sure why I\'m having so much trouble with this. I\'m on OS X 10.7, and I installed Python with default settings and ran the .command file included.

I just want

2条回答
  •  星月不相逢
    2021-01-31 11:24

    Python 3.3 now uses a new virtualenv mechanism called venv.

    You can create one of these environments using:

    pyvenv myprojectname
    

    PyCharm 3.0 does not handle these correctly. The old virtualenv system copied python binaries into the environment, while venv creates symbolic links to the python3.3 binary instead. PyCharm tries to resolve all these symbolic links, until it finds a real file. This results in it ignoring your virtual environment and using the global environment instead.

    To work around this bug, you can copy the python3.3 binary into your environment's bin folder and then add this as the project's interpreter in PyCharm.

提交回复
热议问题