【发布时间】:2017-02-07 20:05:05
【问题描述】:
我刚刚安装了 Python 3.5.2。我在 shell/IDLE 环境中工作并尝试导入 Pandas。
但是当我写的时候:import pandas
我得到以下信息:
Traceback (most recent call last):
File "C:/Users/bartogre/Desktop/Program1.py", line 1, in <module>
import pandas
ImportError: No module named 'pandas'
如何将任何模块添加到 Python 3.5.2 正在读取的库中?我不想在 Anaconda 工作。
我看了这个视频:https://www.youtube.com/watch?v=ddpYVA-7wq4
下面是我的 CMD 输出:
C:\Users\bartogre>
C:\Users\bartogre>cd c:\users\bartogre\desktop\pyodbc-master
c:\Users\bartogre\Desktop\pyodbc-master>python setup.py
c:\Users\bartogre\Desktop\pyodbc-master>python setup.py install
'git' is not recognized as an internal or external command,
operable program or batch file.
WARNING: git describe failed with: 1
WARNING: Unable to determine version. Using 3.0.0.0
C:\Program Files (x86)\Anaconda3\lib\site-packages\setuptools-27.2.0-py3.5.egg\s
etuptools\dist.py:340: UserWarning: The version specified ('3.0.0-unsupported')
is an invalid version, this may not work as expected with newer versions of setu
ptools, pip, and PyPI. Please see PEP 440 for more details.
running install
running bdist_egg
running egg_info
writing pyodbc.egg-info\PKG-INFO
writing dependency_links to pyodbc.egg-info\dependency_links.txt
writing top-level names to pyodbc.egg-info\top_level.txt
reading manifest file 'pyodbc.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyodbc.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_ext
building 'pyodbc' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++
Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
【问题讨论】:
-
在不知道您已经尝试过哪种安装方法的情况下很难给您一个体面的答案。
-
嘿 - 更新了问题。我猜我需要安装landinghub.visualstudio.com/visual-cpp-build-tools?
-
在以前的 Python 3.4 版本中,您必须安装 Microsoft Visual C++ Express 2010 才能提供所需的 C++ 编译器。因此,我假设安装 C++ 构建工具可能是与较新版本相关的相同问题的等效解决方案,因为 MS homepage 声明
They are the same tools that you find in Visual Studio 2015 in a scriptable standalone installer.
标签: python pandas importerror python-3.5