简体   繁体   中英

VSCode no Longer Recognises my Python Conda Environment

as the title describes, VSCode no longer 'accepts' my conda environment. On startup, I get the message box:

'No Python interpreter is selected...'

and a prompt to select environment. If I select the prompt, it opens the dropdown listing the python environments on the system. However, selecting my preferred miniconda python setup (which has worked for over a year) does nothing. The menu closes and the status bar still has an exclamation mark with 'Select Python Interpreter'. This is also set as the default Python interpreter.

Selecting other conda environments and the base environment works - but I don't want to reinstall all my packages onto another environment.

I assume this was caused when I tried to install a new package today. I tried to revert to a past revision but it failed. I'm not sure why but I did some system-wide updates to the system also today. I tried to update all packages in the environment in question but that changed nothing.

I'm working on Arch Linux with miniconda. VSCode was also updated to the latest available version.

Edit: Error I receive in terminal if I hard code my interpreter to the one I want in user settings:

❯ /home/clement/miniconda3/envs/working/bin/python /home/clement/Documents/light_code/real_noise/CBDNet_ISP/Test_Realistic_Noise_model.py [1] 18012 segmentation fault (core dumped) /home/clement/miniconda3/envs/working/bin/python

Edit 2:

I believe the addition of glibc in rev 17 broke the env:

2021-10-18 13:25:11  (rev 17)
     ca-certificates  {2021.7.5 (defaults/linux-64) -> 2020.6.20 (rmg/linux-64)}
     certifi  {2021.5.30 (defaults/linux-64) -> 2020.6.20 (rmg/linux-64)}
    +glibc-2.19 (rmg/linux-64)

2021-10-18 14:49:01  (rev 18)
     absl-py  {0.12.0 (conda-forge/noarch) -> 0.13.0 (defaults/linux-64)}
     c-ares  {1.17.1 (conda-forge/linux-64) -> 1.17.1 (defaults/linux-64)}
     ca-certificates  {2020.6.20 (rmg/linux-64) -> 2021.9.30 (defaults/linux-64)}
     certifi  {2020.6.20 (rmg/linux-64) -> 2021.10.8 (defaults/linux-64)}
     cloudpickle  {1.6.0 (defaults/noarch) -> 2.0.0 (defaults/noarch)}
     fsspec  {2021.7.0 (defaults/noarch) -> 2021.8.1 (defaults/noarch)}
     gnutls  {3.6.13 (conda-forge/linux-64) -> 3.6.15 (defaults/linux-64)}
     grpcio  {1.33.2 (conda-forge/linux-64) -> 1.36.1 (defaults/linux-64)}
     importlib-metadata  {3.7.3 (conda-forge/linux-64) -> 4.8.1 (defaults/linux-64)}
     jpeg  {9d (conda-forge/linux-64) -> 9d (defaults/linux-64)}
     markdown  {3.3.4 (conda-forge/noarch) -> 3.3.4 (defaults/linux-64)}
     nettle  {3.6 (conda-forge/linux-64) -> 3.7.3 (defaults/linux-64)}
     networkx  {2.6.2 (defaults/noarch) -> 2.6.3 (defaults/noarch)}
     pip  {21.0.1 (defaults/linux-64) -> 21.2.4 (defaults/linux-64)}
     setuptools  {52.0.0 (defaults/linux-64) -> 58.0.4 (defaults/linux-64)}
     tk  {8.6.10 (defaults/linux-64) -> 8.6.11 (defaults/linux-64)}
     typing_extensions  {3.10.0.0 (defaults/noarch) -> 3.10.0.2 (defaults/noarch)}
     werkzeug  {1.0.1 (conda-forge/noarch) -> 2.0.1 (defaults/noarch)}
     zipp  {3.4.1 (conda-forge/noarch) -> 3.6.0 (defaults/noarch)}
    +coverage-5.5 (defaults/linux-64)
    +cython-0.29.24 (defaults/linux-64)
    +dataclasses-0.8 (defaults/noarch)
    +libidn2-2.3.2 (defaults/linux-64)
    +libtasn1-4.16.0 (defaults/linux-64)
    +libunistring-0.9.10 (defaults/linux-64)

2021-10-18 15:05:56  (rev 19)
     h5py  {2.10.0 (defaults/linux-64) -> 3.2.1 (defaults/linux-64)}
     scikit-image  {0.17.2 (defaults/linux-64) -> 0.18.1 (defaults/linux-64)}
     scikit-learn  {0.23.2 (defaults/linux-64) -> 0.24.2 (defaults/linux-64)}
     torchvision  {0.2.2 (pytorch/noarch) -> 0.2.1 (soumith/noarch)}
    +cached-property-1.5.2 (defaults/noarch)

我从我的环境中删除了包 +glibc-2.19 (rmg/linux-64),我不再收到错误消息。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM