Jump to content

PyCharm Interpreter


Cheif Operations Director

Recommended Posts

I have been trying to set up PyCharm for a few hours now, I have read the tutorials on JetBrains, but what they seem to be referencing is not there. Any ideas? I did not really know where to post this so... Here I guess
Capture.JPG

Edited by Cheif Operations Director
added more
Link to comment
Share on other sites

It is not uncommon for developers to have multiple versions of Python installed on one machine, for various projects or simply for testing. Virtual environments are there for the same reason.

This simply allows you to run Pycharm with different setups and it probably makes an educated guess where to find the Python executable.

If it’s guessing wrong, you can ask Python what the path to the Python interpreter is:

  • Start the Python console (or IDLE if you prefer that)
  • Type import sys and press enter
  • Type sys.executable and press enter

Whatever that last statement returns is what you need to paste in PyCharm

Link to comment
Share on other sites

32 minutes ago, Cheif Operations Director said:

@Kerbart The thing is I can not run the code to begin with, thus no console opens

I think

Capture.JPG

That? @Kerbart I run that and it just prints another >>> 

What do you run that in? It doesn't look like a regular console or IDLE window.

Try print(sys.executable) although your REPL really should show the path of the python executable without an explicit print statement.

Link to comment
Share on other sites

Just now, Kerbart said:

What do you run that in? It doesn't look like a regular console or IDLE window.

Try print(sys.executable) although your REPL really should show the path of the python executable without an explicit print statement.

loading 1 second

C:\Users\>my_windows_username_ignore_this<\Anaconda3\envs\untitled1\python.exe

Capture.JPG

the name of the project is untitled1

@Kerbart Just to clarify this is the problem I can write my script fine but I can not run it since it wants be to add the config. Just to clarify
Capture.JPG

The Python Console found in tools btw

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...