i took the code out of a virtual environment and it still opens pycharm when i try to open the python file.
i just want to click on my notes app that i made and it open, not open pycharm to then open
i took the code out of a virtual environment and it still opens pycharm when i try to open the python file.
i just want to click on my notes app that i made and it open, not open pycharm to then open
Hello,
from your post title, if you want to run a module without opening an IDE (i.e., PyCharm
), you can run it from the command prompt. Just type the module name along with the .py
extension.
For example:
module_name.py # assuming you are in the working directory as
# the module else include the path
it still opened it.
im pulling my hair out right now
Don’t open it. Just open the command prompt
that is on your computer.
In the bottom search, type cmd
.
i opened cmd, i went to where the .py is, i ran “start notes.py” and it opened it inside of pycharm
edit: just running “notes.py” does the same thing
You don’t have to do that. Stay in the cmd
prompt window. Like I stated above, if you’re in the same working directory as the module, just type its name along with the .py
file type. Otherwise, include its path.
Assuming it is on your C
drive:
dude im at a loss, i am so frustrated right now
C:\>start notes.py
it says windows cannot find it. it is on my desktop, i spelled it correctly, i only have a C drive, i dont understand why its not working im loosing my mind
Notice that it states that you’re on the C
drive.
In the command prompt, type this to change the working directory to the Desktop
:
chdir Desktop
First, however, rename your module as: start_notes.py
(there should never be blank spaces in filenames).
Then try again.
it still opens pycharm
it opens in light edit in pycharm, maybe that has something to do with it?
Can you please provide a screenshot of what you’re typing in the command prompt.
Can you please go to Windows
explorer and go to the C:
drive. Is there a Desktop
there?
Or type this in the command prompt:
chdir C:\Desktop
Does that work?
I was expecting the Desktop
to be on your C:
drive. Can you check (just to make sure there are not two copies).
Ok.
Go to the location where you have the file/module. Righ-click on it. Where it states: Opens with
, what does it state? It should state Python
and not Pycharm
. If so, click on the button Change ...
, and make sure you select:
i do not have that, i downloaded and installed python before getting pycharm.
would it be because i may not have selected “add to PATH” when setting up python?
Have you downloaded IDLE
? If not, please download it.
AHH ITS WORKING
thank you so much man u have no idea
Awesome!