我正在尝试在pyCharm中安装熊猫,但是我不断收到以下错误消息:
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279
现在,我已经通过他们提供给我的链接下载并安装了Microsoft Visual C ++ 10.0,但是仍然出现相同的错误。我什至尝试从pyCharm终端安装它,它给出以下信息:
(python.exe) C:\Users\danie\Desktop\Python>pip install pandas
Requirement already satisfied: pandas in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (0.23.4)
Requirement already satisfied: python-dateutil>=2.5.0 in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (from pandas) (2.7.5)
Requirement already satisfied: numpy>=1.9.0 in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (from pandas) (1.15.4)
Requirement already satisfied: pytz>=2011k in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (from pandas) (2018.7)
Requirement already satisfied: six>=1.5 in c:\users\danie\appdata\local\programs\python\python37-32\lib\site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
我还尝试了升级pip,但这是显示的内容:
(python.exe) C:\Users\danie\Desktop\Python>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\miniconda3\envs\my_env\python.exe\lib\site-packages (18.1)
我多次重启PC。
(python.exe) C:\Users\danie\Desktop\Python>SET
FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer
CommonProgramFiles=C:\Program Files\Common Files
SESSIONNAME=Console
COMPUTERNAME=DESKTOP-0OV717O
TMP=C:\Users\danie\AppData\Local\Temp
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
OneDriveConsumer=C:\Users\danie\OneDrive
__INTELLIJ_COMMAND_HISTFILE__=C:\Users\danie\.PyCharm2018.3\config\terminal\history\history-
SystemDrive=C:
NUMBER_OF_PROCESSORS=8
LOGONSERVER=\\DESKTOP-0OV717O
TEMP=C:\Users\danie\AppData\Local\Temp
ProgramW6432=C:\Program Files
HOMEPATH=\Users\danie
_OLD_VIRTUAL_PROMPT=$P$G
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_OLD_VIRTUAL_PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Intel\iCLS Client\
;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C
:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;D:\Program Files\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\
Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\P
rogram Files\Intel\Intel(R) Management Engine Components\IPT;D:\Program Files\JRE\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\
NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Users\danie\AppData\Local\Programs\Python\Launcher\;D:\Program Files\Python3;C:\Users\danie\App
Data\Local\Programs\Python\Python37-32\Scripts;
USERNAME=danie
ProgramFiles=C:\Program Files
USERDOMAIN_ROAMINGPROFILE=DESKTOP-0OV717O
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
LOCALAPPDATA=C:\Users\danie\AppData\Local
TERMINAL_EMULATOR=JetBrains-JediTerm
VIRTUAL_ENV=C:\Miniconda3\envs\my_env\python.exe
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
DriverData=C:\Windows\System32\Drivers\DriverData
APPDATA=C:\Users\danie\AppData\Roaming
ALLUSERSPROFILE=C:\ProgramData
USERDOMAIN=DESKTOP-0OV717O
PROCESSOR_LEVEL=6
ProgramData=C:\ProgramData
ComSpec=C:\WINDOWS\system32\cmd.exe
PROCESSOR_ARCHITECTURE=AMD64
FPS_BROWSER_USER_PROFILE_STRING=Default
SystemRoot=C:\WINDOWS
GOOGLE_API_KEY=no
PROCESSOR_REVISION=9e09
OneDrive=C:\Users\danie\OneDrive
GOOGLE_DEFAULT_CLIENT_ID=no
PROJECT_DIR=C:/Users/danie/Desktop/Python
PATH=C:\Miniconda3\envs\my_env\python.exe\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\
Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;D:\Program Files\Git\cmd;C:\WINDOWS\System32\
OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Manag
ement Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\Program Files\JRE\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\W
irelessCommon\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Users\danie\AppData\Local\Programs\Python\Launcher\;D:\Program
Files\Python3;C:\Users\danie\AppData\Local\Programs\Python\Python37-32\Scripts;
ProgramFiles(x86)=C:\Program Files (x86)
USERPROFILE=C:\Users\danie
CommonProgramW6432=C:\Program Files\Common Files
windir=C:\WINDOWS
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
OS=Windows_NT
asl.log=Destination=file
PUBLIC=C:\Users\Public
PROMPT=(python.exe) $P$G
HOMEDRIVE=C:
GOOGLE_DEFAULT_CLIENT_SECRET=no
答案 0 :(得分:0)
似乎您正在运行Anaconda环境,但仍尝试通过pip安装模块。这是一种不好的做法,尤其是在Windows上。 Anaconda还为您的环境提供了二进制非Python依赖项。
正确的方法:
conda install pandas
话虽如此,您的方式虽然不建议使用,但也应该有效。要进行故障排除,请在命令行中运行:
vcvarsall.bat
并显示输出。SET
。这将为我们提供所有环境变量。[编辑-后果]
通过Anaconda命令提示符而不是PyCharm安装模块。 PyCharm不会加载构建程序包所需的环境变量。
答案 1 :(得分:0)
当我尝试使用熊猫运行python程序时,我遇到了相同的错误(缺少Visual C ++ ...)。我已经成功使用了conmand行:pip install pandas,但是仍然出现错误。重新启动计算机不能解决此问题。 所以我决定放弃这个IDE,PyCharm。相反,我安装了IDE“ Visual Studio Code”,然后该错误消失了。