我试图安装Python包dulwich:
pip install dulwich
Run Code Online (Sandbox Code Playgroud)
但我得到一个神秘的错误信息:
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud)
如果我尝试手动安装包,也会发生同样的情况:
> python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud) 我刚刚安装了Visual Studio社区,其中包含Python和Data Science的工作负载.
我从Python\Machine Learning模板创建了一个新的回归项目.
前几行是:
from pandas import read_table
import numpy as np
import matplotlib.pyplot as plt
Run Code Online (Sandbox Code Playgroud)
首先我得到错误:No module named xxx
或者Missing required dependencies [xxx]
,对于pandas或numpy,或scikitlearn或scipy.
我原本希望这些作为Visual Studio工作负载的一部分安装,实际上它们似乎在Anaconda3\Lib\sitpackages
文件夹中,如果它们应该在那里.但我尝试从VS中的Python Environments窗口安装它们.
如果我很幸运,那么我将错过了上述错误:Importing the multiarray numpy extension module failed.
.
任何人都有任何指针来设置它?