简体   繁体   English

在安装Numpy时ValueError:['path']

[英]ValueError: ['path'] while installing Numpy

I'm trying to install a new version of Numpy. 我正在尝试安装新版本的Numpy。 I was getting an error for not having the Microsoft Visual C++, but I installed that so that's fine now. 我因为没有Microsoft Visual C ++而遇到错误,但是我安装了它,所以现在很好。 The only problem is that now I'm getting a new error: 唯一的问题是,现在我遇到了一个新错误:

    File "C:\Users\Name\Anaconda3\lib\distutils\msvc9compiler.py", line 287,     
in query_vcvarsall
    raise ValueError(str(list(result.keys()))
ValueError: ['path']

If necessary, I can provide the actual file in question. 如有必要,我可以提供实际的文件。 I'm not doing so right now because it's quite a large file (for my experience, at least). 我现在不这样做,因为它是一个很大的文件(至少以我的经验而言)。

I'm sorry if this is an obvious or silly question, I am just getting started with python. 如果这是一个显而易见或愚蠢的问题,我感到很抱歉,我才刚开始使用python。 I was not able to find anything else on this website about this problem specifically, merely other people who have had different ValueError or pathing problems in unrelated circumstances. 我无法在此网站上找到关于此问题的其他任何东西,只能找到在不同情况下有不同ValueError或路径问题的其他人。

Edit: I am working on Windows 10 and Anaconda, if that is relevant. 编辑:如果相关,我正在Windows 10和Anaconda上工作。 I am sorry if those are not good choices, but I am only a student right now; 很抱歉,如果这些都不是很好的选择,但我现在只是一名学生。 I do not want to get something more complicated if I can avoid it. 如果可以避免,我不想变得更复杂。

Thank you in advance. 先感谢您。

I had a very similar issue when trying to install a different python package on my system. 尝试在系统上安装其他python软件包时,我遇到了非常相似的问题。 After some debugging I found that the query_vcvarsall function in the msvc9compiler.py script makes sure that 4 required environment variables are present on your system ("include", "lib", "libpath" and "path"). 经过一些调试后,我发现msvc9compiler.py脚本中的query_vcvarsall函数确保系统上存在4个必需的环境变量(“ include”,“ lib”,“ libpath”和“ path”)。 Based on the error you're getting, the only one of these environment variables present on your system is "path". 根据您得到的错误,系统上存在的这些环境变量中唯一的一个就是“路径”。 So you need to either add environment variables that point to the write include, lib and libpath folders or fix your installation of your compiler so they get loaded automatically. 因此,您需要添加指向write include,lib和libpath文件夹的环境变量,或者修复编译器的安装,以使它们自动加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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