gpt4 book ai didi

python - pyenv virtualenv : The SDK seems invalid 的 pycharm 错误

转载 作者:行者123 更新时间:2023-12-04 18:39:06 28 4
gpt4 key购买 nike

尝试选择通过 pyenv virtualenv 创建的 python bin 作为解释器时,我遇到了 pycharm 的问题。

Cannot set up a python SDK 
at Python 3.10 (remote_maax) ($HOME/.pyenv/versions/remote_maax/bin/python).
The SDK seems invalid.
我想提供更多细节,但 pycharm 不提供任何额外的输出。
更奇怪的是我是 不是 使用 python 3.10,virtualenv 是使用 python 3.8.5 创建的。
当使用 pyenv activate 从 shell 手动激活时,virtualenv 似乎也可以工作。 .我可以 pip 安装包并正确使用它们。
我正在通过 flatpak 安装新的 pop os 20.10 (ubuntu)、内核 5.8.0-7642-generic、pyenv 1.2.22、pycharm community 2020.3.3。
有谁知道这会导致什么?
编辑:通过从 shell 启动 pycharm 找到了更多细节
com.jetbrains.python.sdk.InvalidSdkException: Failed to determine Python's sys.path value:
STDOUT:
STDERR: /home/gio/.pyenv/versions/remote_maax/bin/python3.8: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/gio/.pyenv/versions/remote_maax/bin/python3.8)

at com.jetbrains.python.sdk.PythonSdkType.getSysPathsFromScript(PythonSdkType.java:457)
at com.jetbrains.python.sdk.PythonSdkType.getSysPath(PythonSdkType.java:439)
at com.jetbrains.python.sdk.PythonSdkUpdater.evaluateSysPath(PythonSdkUpdater.java:576)
at com.jetbrains.python.sdk.PythonSdkUpdater.getLocalSdkPaths(PythonSdkUpdater.java:436)
at com.jetbrains.python.sdk.PythonSdkUpdater.updateLocalSdkPaths(PythonSdkUpdater.java:400)
at com.jetbrains.python.sdk.PythonSdkUpdater.updateLocalSdkVersionAndPaths(PythonSdkUpdater.java:370)
at com.jetbrains.python.sdk.PythonSdkUpdater.lambda$updateVersionAndPathsSynchronouslyAndScheduleRemaining$0(PythonSdkUpdater.java:267)
at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:275)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:962)
at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:520)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:79)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
不幸的是,我确实安装了 libc 2.32,所以现在我更加困惑了。
glibc-source/groovy,groovy,now 2.32-0ubuntu3 all [installed]
GNU C Library: sources

libc6/groovy,now 2.32-0ubuntu3 amd64 [installed]
GNU C Library: Shared libraries

最佳答案

Pycharm 的 flatpack 版本似乎存在问题。我遇到了完全相同的问题(PopOS,Pycharm Professional 2020.3)。最后,我用独立版本替换了 flatpack 版本(我从 Jetbrains 网站下载了 Pycharm),并且在完全相同的环境中工作得很好。

关于python - pyenv virtualenv : The SDK seems invalid 的 pycharm 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66110150/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com