Gradient icon indicating copy to clipboard operation
Gradient copied to clipboard

Conda environment py35cpu was not found

Open kurikabocya opened this issue 5 years ago • 2 comments

[1] Windows10 (py35cpu) C:\work\automator>conda info -e

conda environments:

base C:\ProgramData\Anaconda3 py35cpu * C:\ProgramData\Anaconda3\envs\py35cpu tf-1.x-cpu C:\ProgramData\Anaconda3\envs\tf-1.x-cpu keras-yolo C:\Users\840002.conda\envs\keras-yolo

(py35cpu) C:\work\automator>env | grep -i GRADI GRADIENT_PYTHON_ENVIRONMENT=conda:py35cpu

[2] C:\work\automator\OpenCVEAST\Gradient-Samples-master\CSharpOrNot\CSharpOrNotProgram.cs GradientEngine.UseEnvironmentFromVariable() exception with LostTech.Gradient.GradientInitializationException: 'Conda environment py35cpu was not found.'

kurikabocya avatar Oct 13 '20 00:10 kurikabocya

Thank you for the report. This looks like an issue in our open source project https://github.com/losttech/WhichPython , which is used to locate Python environments.

Specifically, the environment in question appears to be a system-wide environment (note it is in ProgramData), and WhichPython only searches among user environments.

Workaround

The workaround would be to construct the environment object using CondaEnvironment.DetectCondaEnvironment with full environment path (e.g. C:\ProgramData\Anaconda3\envs\py35cpu) , and pass it to GradientEngine.UseEnvironment(...). Alternatively, it should be possible to manually construct PythonEnvironment instance.

lostmsu avatar Oct 13 '20 00:10 lostmsu

Opened the issue in WhichPython: https://github.com/losttech/WhichPython/issues/5

lostmsu avatar Oct 13 '20 00:10 lostmsu