0

I have just installed VS Code and trying to run python code. In the past, I had already created some virtual environments (which I am able to see in VS Code), but for the moment I am using the base one.

I am trying to import some standard libraries which are present in the base environment (I tried also the conda environment), but VS code displays that the modules could not be resolved (Pylance).

enter image description here

I have noticed that when I open VS Code, the terminal tries to activate conda with "conda activate PATH_TO_MY_FOLDER/.conda", so it's trying to activate an environment in my folder, but it displays this error: conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have also noticed that VS Code warns me of the environment variable PATH which has some """ characters:

enter image description here

EDIT: I add here also the Path environment variable relative to my user (not relative to the system)

enter image description here Do you have any suggestion on how to proceed? Thanks.

VanBaffo
  • 259
  • 1
  • 2
  • 13

1 Answers1

0

Try to add path to environment variable.

C:\Users\username\AppData\Local\Programs\Microsoft VS Code\bin

check the path of your VS Code bin folder

  • The path you mention is already in the path environment variable – VanBaffo Dec 02 '22 at 17:14
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 04 '22 at 19:25