安装conda软件包后的详细响应

2024-04-19 12:39:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我在尝试安装几个软件包时遇到了以下问题。我将使用sqlite3作为示例

当我在Anaconda提示符(“base”环境)中输入conda install -c blaze sqlite3时,我收到了下面的输出

我不确定这个问题是什么时候开始的。我使用conda list -r检查了我的修订。修订版#35-conda {4.8.3 (conda-forge/win-64) -> 4.8.3 (anaconda/win-64)}看起来很奇怪

因此,我输入了conda install revision 34。当我这样做时,我被告知conda-forge/win-64找不到,这似乎很奇怪。如前所述,我不清楚第34版和这个错误之间是否有关联

Anaconda Navigator中“基本”环境中列出的sqlite3

如何防止conda自动运行附加代码

Collecting package metadata (current_repodata.json): done
Solving environment: /
Warning: 2 possible package resolutions (only showing differing packages):
  - anaconda/win-64::conda-4.8.3-py37_0
  - defaults/win-64::conda-4.8.3-py37done

## Package Plan ##

  environment location: C:\Users\morga\Anaconda3

  added / updated specs:
    - sqlite3


The following NEW packages will be INSTALLED:

  sqlite3            blaze/win-64::sqlite3-3.8.6-0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

C:\Users\morga>SET DISTUTILS_USE_SDK=1

C:\Users\morga>SET MSSdk=1

C:\Users\morga>SET platform=

C:\Users\morga>IF /I [AMD64] == [amd64] set "platform=true"

C:\Users\morga>IF /I [] == [amd64] set "platform=true"

C:\Users\morga>if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" )  ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0" )

C:\Users\morga>for /F "skip=2 tokens=2,*" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B"
ERROR: The system was unable to find the specified registry key or value.

C:\Users\morga>if "" == "" (set "VSINSTALLDIR=" )

C:\Users\morga>if "" == "" (
ECHO "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work"
 GOTO End
)
"WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work"
The system cannot find the batch label specified - End

<<<&书信电报;编辑-附加注释>&燃气轮机&燃气轮机

我做了更多的研究,似乎是包 vs2015_win-64造成了问题。其他人也有类似的经历

我执行了conda uninstall vs2015_win-64。卸载已启动,然后停止,我收到以下错误

当我尝试使用conda install plotly进行plotly安装时,也发生了同样的事情

Error processing line 1 of C:\Users\morga\Anaconda3\lib\site-packages\matplotlib-3.1.0-py3.7-nspkg.pth:

  Traceback (most recent call last):
    File "C:\Users\morga\Anaconda3\lib\site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "<frozen importlib._bootstrap>", line 580, in module_from_spec
  AttributeError: 'NoneType' object has no attribute 'loader'

Tags: installinpackageslinenotfindcondawin
1条回答
网友
1楼 · 发布于 2024-04-19 12:39:48

这不太可能与该版本中conda包的变化有任何关系(在该版本中,它从Conda Forge采购切换到了Anaconda channel)。相反,有些软件包包含additional installation scripts,安装期间必须运行该软件包才能正常运行。目前没有任何方法阻止Conda执行此类脚本

这里值得一提的是,这是一个很好的例子,说明了为什么不应该从不明确信任的渠道安装软件包。也就是说,搜索Anaconda Cloud以在随机用户通道上查找包可能会导致运行用户已包含在包构建中的任意代码

相关问题 更多 >