-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conda command broken for new anaconda python installations #5503
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
Comments
Try typing You may first need to first navigate to /Anaconda3/Scripts/conda.exe. I don't know if vscode or anaconda needs to fix this up, but I just went through this same pain. |
I don't know exactly what's going on with the details, but it looks like the Python extension has a setting "Python > Terminal: Activate Environment" that attempts to call However, this command won't execute properly unless your powershell startup script is already doing some work. Running Looking at this thread, perhaps you could run
|
@ARF1 "python.condaPath": "<fully qualifieid path to conda executable>" @ARF1 |
@ryan-feeley You suggest running I like that anaconda now refrains from cluttering my system-wide path & environment varible settings and I am somewhat reluctant to undo their good work. ;-) Ideally I would like to limit the fix to the vscode-specific powershell. @DonJayamanne
When clicking on the "More Info" button it links to #2898. Also note: I do not quite understand why vscode finds all my conda environments without any problem but somehow fails to find the location of the conda command. This is surprising since it is just one level above the environments in the folder hierarchy. |
@DonJayamanne
I took that to mean that the directory was required. What is actually required it the path plus the conda executable. I set Is the description misleading? It might just be me... Anyway after fixing this, conda now works. - Sort of... It starts off with some error messages before then working ok:
Thus setting |
I hardly have even passing knowledge of how this works, but I think running If you run That said, this approach is a little cleaner than the older "Add a bunch of Anaconda directories to your system path" approach since with the newer method they are only messing with your path in a temporary way when you're in a terminal program. At the end of the day you want something on your path or you'll spend all your time typing out fully-qualified executable names. |
Closing as we expect users to setup their shells for conda to work. |
Issue Type: Bug
When the Anaconda / Miniconda python distribution is installed with an installer of the current version on Windows, the
conda
is no longer added to the PATH environment variable.See: https://docs.anaconda.com/anaconda/reference/release-notes/#what-s-new-in-anaconda-4-4
The python extension however still calls the command
conda
(and presumably others) as if they were available in PATH.Steps to reproduce:
Extension version: 2019.4.11987
VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.17763
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: