Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Conda" not recognized in PowerShell invoked in Python Environments menu #8037

Closed
vsfeedback opened this issue Oct 23, 2024 · 1 comment
Closed
Assignees

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:Other]
I was using CoPilot to create a Conda environment file. CoPilot suggested that I select "Open in PowerShell" from the Python Environments menu in Visual Studio and enter the following command: conda activate "myenvironment". When I entered the text, I received an error message that "conda" was not recognized (please see the text below). I was able to open an anaconda prompt from the start menu and generate the environment file. I do not know whether generating an environment file "myenvironment.yml" is supported by Visual Studio. There may also be issues with generating an accurate "requirements.txt" file in that the generated file does not reflect the selected environment.

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.
At line:1 char:1

  • conda activate
  •   + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

Original Comments

Feedback Bot on 10/13/2024, 06:52 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@rchiodo
Copy link
Contributor

rchiodo commented Oct 23, 2024

I believe this is by design. You have to start Visual Studio from a conda environment if you want 'conda' to be available or add conda to your system paths. Visual Studio doesn't add conda to the path automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants