【问题标题】:VSCode displays "Module numpy could not be resolved"VSCode displays \"Module numpy could not be resolved\"
【发布时间】:2022-12-02 01:08:15
【问题描述】:

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).

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:

Do you have any suggestion on how to proceed? Thanks.

【问题讨论】:

    标签: python visual-studio-code path conda


    【解决方案1】:

    Try to add path to environment variable.

    C:UsersusernameAppDataLocalProgramsMicrosoft VS Codein

    check the path of your VS Code bin folder

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-24
      • 2015-12-18
      • 2018-02-23
      • 1970-01-01
      相关资源
      最近更新 更多