I installed Python 2.7.11 on this Mac, and from terminal Python 2.7.11 can be started. However,
From the interpreter of Pycharm (2016.1 version) , there is no Python 2.7.11.
Any suggestions ? Thanks
PS:I successfully did this on one Mac, but for some reason I cannot make it on another Mac... odd..
if you cannot find from the list, you can add it manually,
https://www.jetbrains.com/help/pycharm/2016.1/configuring-local-python-interpreters.html?origin=old_help
you need to specify the python path in the add local dialogue. you mentioned that you can start python 2.7.11 from your terminal, then type 'which python' in your terminal and get your python path. copy paste this path to your PyCharm "add Local" . e.g:
bash-3.2$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
Just click on the python in the first image you uploaded. It will work.
Related
I followed a udacity tutorial to download python and I'm having some trouble. I downloaded python and I can see that I have when I type in python --version in the terminal. It's version 3.8.2. When I type in python3 --version, I get: /appData/Local/Microsoft/WindowsApps/python3: Permission Denied.
Why does python --version work but not python 3 --version? What permission is denied?
It looks like this added two "stubs" called python.exe and python3.exe into the %USERPROFILE%\AppData\Local\Microsoft\WindowsApps folder, it's inserted before existing Python executable's entry in the PATH.
Moving this entry below the correct Python folder (partially) corrected the issue.
Type manage app execution aliases into the Windows search prompt and disable the store versions of Python altogether.
I installed python3, I can open idle and it says it is running python3.0.1, but when I enter python3 in the terminal (on OSX) I get an error saying 'command not found'. Entering python gets me the 2.x version that came on the computer. Any advice on how I can access python3 from the terminal?
Thanks
First, don't use Python 3.0.1. It has many problems and was officially retired upon the release of Python 3.1 (currently 3.1.2). You can find the python.org Mac OS X installer for 3.1.2 here. Once it is installed, then you need to ensure that the bin directory from the 3.1.2 framework (/Library/Frameworks/Python.framework/Versions/3.1/bin) is on your shell search path. You can manually modify an appropriate shell startup file, like .bash_profile. Or just double-click the Update Shell Profile.command found in /Applications/Python 3.1. In either case, you will need to open a new terminal window or re-login. Another approach is to install Python 3.1 from MacPorts or another distributor. Also, alpha releases of Python 3.2 are now available from python.org and elsewhere.
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 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"
I installed python3, I can open idle and it says it is running python3.0.1, but when I enter python3 in the terminal (on OSX) I get an error saying 'command not found'. Entering python gets me the 2.x version that came on the computer. Any advice on how I can access python3 from the terminal?
Thanks
First, don't use Python 3.0.1. It has many problems and was officially retired upon the release of Python 3.1 (currently 3.1.2). You can find the python.org Mac OS X installer for 3.1.2 here. Once it is installed, then you need to ensure that the bin directory from the 3.1.2 framework (/Library/Frameworks/Python.framework/Versions/3.1/bin) is on your shell search path. You can manually modify an appropriate shell startup file, like .bash_profile. Or just double-click the Update Shell Profile.command found in /Applications/Python 3.1. In either case, you will need to open a new terminal window or re-login. Another approach is to install Python 3.1 from MacPorts or another distributor. Also, alpha releases of Python 3.2 are now available from python.org and elsewhere.
How do I direct Eclipse to the Python interpreter on my Mac?
I've looked in Library which contains the directory 'Python' then '2.3' and '2.5', however they contain nothing except 'Site-packages' - Which is weird considering I can go into the terminal and type python. I then installed the latest 2.6 version with package manager and still can't find it. Can anyone help?
An alias to the python interpreter was likely installed into /usr/local/bin. So, to invoke python2.6, type /usr/local/bin/python2.6 or, most likely, just python2.6. If you want python to invoke python2.6, try rearranging your $PATH so that /usr/local/bin precedes /usr/bin.
Running $which python should help locate your Python installation.
I just solved this for my Mac and it was located in
/usr/bin/python2.7
The way I found it is as follows:
(1) I tried entering the following to see if I could find where Python was located
echo $PYTHONPATH
This had the location of a custom install of Python that came from another program I downloaded, but I wanted the native Python.
(2) I wanted to see every folder in the path so I could look for python
echo $PATH
This returned the following:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/sbin
(2b) I CDed into every one of these locations and searched for python in each one.
cd /usr/bin/
ls | grep "python"
And I eventually found Python.
In Eclipse, with PyDev, if you (1) click Preferences (2) PyDev (3) Interpreter - Python, you can add the interpreter.
If you have installed python on mac, follow belows steps (on eclipse neon)
Click on Preferences
Search for python
Below screen will appear
Click Choose from list
It will show up all the python installed and select one for you
Hope it helps some one. It resolve my problem.