Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I’ve posted about this issue before but the problem still stands. I am a recent graduate who took a class in python coding but want to further advance my skills. I am trying to follow the “KidsCanCode” videos available on YouTube in hopes of creating a basic video game. I followed the download instructions for python 3.8.2 (Mac version) but am having trouble opening up the shell. When I try to open my IDLE application within the python 3 folder to access the shell, it bounces on my dock but then nothing happens. I am able to get the python 2 shell to come up when I type “idle” into the terminal but not the 3. I’ve tried deleting it and re-downloading it but the issue remains. I’ve tried changing the default python version from 2 to 3 in the launcher by putting “/use/local/bin/python3” in the interpreter but still nothing happens. I’ve tried installing a new tack/tk but am not sure how to run it with the python package to get it to work. Does anyone know how to get this running or who I can contact? The only way I have been able to run any python codes/commands is through the terminal. Here I can type “python3” and the run some print codes. What am I doing wrong? How do I open the IDLE application within the python 3 folder so that the shell will appear? Thanks for the help and if you need clarification I can for sure answer so that this problem can be solved.

What I have tried:

I tried changing the default python version from 2 to 3 by putting "/use/local/bin/python3"in the terminal. Ive tried downloading a newer version of tcl/tk however, I think I did not get it working. I tried updating the pip but was unsuccessful and running a old version.
Posted
Updated 14-Jun-20 19:50pm

1 solution

well, Im not sure what you've read, but the first two links I found are

4. Using Python on a Macintosh — Python 3.8.3 documentation[^] and Hello World in Python 3 on Mac OS X[^]

Quote:
when I type “idle” into the terminal
... have you tried typing 'idle3' ? I thought that was how IDLE was started in a 'mixed' Python version environment

Another thing that may be worth trying is, if you do a 'python --help' you should see
Quote:
Other environment variables:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH : ':'-separated list of directories prefixed to the
default module search path. The result is sys.path.
PYTHONHOME : alternate <prefix> directory (or <prefix>:<exec_prefix>).
The default module search path uses <prefix>/pythonX.X.


So you may need to set PYTHONHOME to point to your /usr/local/bin/python3 bin folder - that is to say, vi ~/.bashrc and add

export PYTHONHOME=/usr/local/bin/python3

under any statements or replace if there's one already set (there isnt on my Mac, but Ive only got the original Python 2 version anyway)

I hope there's something useful here - when the world wakes up someone else may have more knowledge and chip in
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900