Different versions of Python inside and outside the Pycharm.

Hello,

I am a Mac user and I have the following situation.

When I start python in console, I get this:

MacBook-Aleksandr-Motsjonov:site-packages soswow$ python

Python 2.6.6 (r266:84292, Mar  6 2011, 17:44:21)

[GCC 4.2.1 (Apple Inc. build 5664)] on darwin

>>> import sys

>>> sys.version

'2.6.6 (r266:84292, Mar  6 2011, 17:44:21) \n[GCC 4.2.1 (Apple Inc. build 5664)]'

But When I add new python interpreter in Pycharm, I get (running script inside pycharm)

2.6.1 (r261:67515, Jun 24 2010, 21:47:49)

[GCC 4.2.1 (Apple Inc. build 5646)]

But initial binary is the same (as I see and think):

MacBook-Aleksandr-Motsjonov:site-packages soswow$ which python

/opt/local/bin/python

MacBook-Aleksandr-Motsjonov:site-packages soswow$ ls -la /opt/local/bin/python*

lrwxr-xr-x  1 root  admin    24 Mar 11 07:35 /opt/local/bin/python -> /opt/local/bin/python2.6

lrwxr-xr-x  1 root  admin    31 Mar 11 07:35 /opt/local/bin/python-config -> /opt/local/bin/python2.6-config

lrwxr-xr-x  1 root  wheel    73 Mar  6 17:46 /opt/local/bin/python2.6 -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6

lrwxr-xr-x  1 root  wheel    80 Mar  6 17:46 /opt/local/bin/python2.6-config -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config

-rwxr-xr-x  2 root  admin  5611 Aug 15  2010 /opt/local/bin/python_select

lrwxr-xr-x  1 root  admin    25 Mar 11 07:35 /opt/local/bin/pythonw -> /opt/local/bin/pythonw2.6

lrwxr-xr-x  1 root  wheel    74 Mar  6 17:46 /opt/local/bin/pythonw2.6 -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6

MacBook-Aleksandr-Motsjonov:site-packages soswow$ ls -la /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python*
lrwxr-xr-x  1 root  wheel     9 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python -> python2.6
lrwxr-xr-x  1 root  wheel    16 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python-config -> python2.6-config
-rwxr-xr-x  2 root  wheel  8584 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
-rwxr-xr-x  2 root  wheel  1473 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config
lrwxr-xr-x  1 root  wheel    10 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw -> pythonw2.6
-rwxr-xr-x  2 root  wheel  8584 Mar  6 17:46 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6

And Pycharm:

python_settings.jpg

Btw, listing of sys.path is also different.

It seems I dont' understand some basing things about python executables and paths.

Can anybody help me with that?



Attachment(s):
python_settings.jpg
1 comment
Comment actions Permalink

Ok. I found it by myself.

There were 2 paths

/opt/local/Library/Frameworks/ and /System/Library/Framework.

Sorry =)

0

Please sign in to leave a comment.