r/learnpython • • Oct 23 '26

Python doesn't work in vc

I just want to

print("hello, world")

and it doesn't work

0 Upvotes

25 comments sorted by

View all comments

Show parent comment

1

u/TotoCodeFR Oct 23 '26

Then you probably haven't went into the folder where the file is located. Type cd path\to\home\tec (obviously change the path to where the home/tec folder is actually found)

-1

u/anas_mv Oct 23 '26

cd\path\to\home\tec : The module 'cd' could not be loaded. For more information, run 'Import-Module cd'. At line:1 char:1

  • cd\path\to\home\tec
  •   + CategoryInfo          : ObjectNotFound: (cd\path\to\home\tec:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CouldNotAutoLoadModule

2

u/TotoCodeFR Oct 23 '26

You forgot the space between cd and the path and you need to change the path correctly

1

u/anas_mv Oct 23 '26

Still the same

2

u/TotoCodeFR Oct 23 '26

Go to file explorer. Navigate to the folder where your hello.py is located. Copy its path (I hope you know how to do so). Then, in the terminal, type "cd" (no quotes), a space, then paste your path. To paste, generally Ctrl+Shift+V works.

2

u/anas_mv Oct 23 '26

FINALLY Thank you bro