-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 env defined $PYTHONPATH is ignored - breaks pylint, refactoring,... #13962
Comments
Thanks! I had completely overlooked these options all the way at the bottom. In my case:
I tried your proposal and it works. I also tried the reverse: I activated both options and it works without having to fire up a terminal. Ie everything works as expected (pylint works again, the first terminal jumps into the conda environment, and all) which is more comfortable. I have no idea how "activate on load" got disabled. I'm pretty sure I didn't change it (but only 99%). Or maybe they're new options? Now I read you when you say there are some known issues with conda. Maybe I'm getting lucky but I'll keep my eyes open. Can you point me to the existing bugs to be aware of the symptoms ? |
Issue Type: Bug
I set up Code Studio to use a conda environment called LMCrypto for my project.
Here is the content from settings.json that was generated by selecting the environment from the bottom left blue status line:
(LMCrypto)# cat ../.vscode/settings.json
{
"python.pythonPath": "/Users/fdetienn/anaconda3/envs/LMCrypto/bin/python"
}
This environment contains a PYTHONPATH:
(LMCrypto)# echo $PYTHONPATH
/Users/fdetienn/Documents/Programming/LazyMaestro/standalone/lmcrypto
When CodeStudio runs pylint (upon saving the file), all the import for my own modules are underlined in red with a pylint-import error .
When I run pylint from a terminal (including in code studio's terminal), pylint properly detects the import path from PYTHONPATH.
I.e. the problem only appears when Code Studio runs pylint on its own.
Seemingly, code refactoring is also broken.
This was working nicely before my vacation and seems to have appeared with the latest upgrade.
Extension version: 2020.8.109390
VS Code version: Code 1.49.0 (e790b931385d72cf5669fcefc51cdf65990efa5d, 2020-09-10T17:39:53.251Z)
OS version: Darwin x64 19.6.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: