[英]VSCode no Longer Recognises my Python Conda Environment
as the title describes, VSCode no longer 'accepts' my conda environment.正如标题所描述的,VSCode 不再“接受”我的 conda 环境。 On startup, I get the message box:
启动时,我收到消息框:
'No Python interpreter is selected...'
'没有选择 Python 解释器...'
and a prompt to select environment.并提示选择环境。 If I select the prompt, it opens the dropdown listing the python environments on the system.
如果我选择提示,它会打开下拉列表,列出系统上的 python 环境。 However, selecting my preferred miniconda python setup (which has worked for over a year) does nothing.
但是,选择我喜欢的 miniconda python 设置(已经工作了一年多)没有任何作用。 The menu closes and the status bar still has an exclamation mark with 'Select Python Interpreter'.
菜单关闭,状态栏仍然有一个带有“选择 Python 解释器”的感叹号。 This is also set as the default Python interpreter.
这也被设置为默认的 Python 解释器。
Selecting other conda environments and the base environment works - but I don't want to reinstall all my packages onto another environment.选择其他 conda 环境和基本环境有效 - 但我不想将所有软件包重新安装到另一个环境中。
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.我正在使用 miniconda 开发 Arch Linux。 VSCode was also updated to the latest available version.
VSCode 也更新到了最新的可用版本。
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
❯ /home/clement/miniconda3/envs/working/bin/python /home/clement/Documents/light_code/real_noise/CBDNet_ISP/Test_Realistic_Noise_model.py [1] 18012 分段错误(核心转储)/home/clement/miniconda3/envs/工作/斌/蟒蛇
Edit 2:编辑2:
I believe the addition of glibc in rev 17 broke the env:我相信在 rev 17 中添加 glibc 打破了环境:
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),我不再收到错误消息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.