当我使用python 3.8时,python pandas模块曾经可以工作。我已经升级到python 3.9,它停止工作了。我尝试安装它,但是出现错误。
这是我的python版本:
Python 3.9.0a1
我正在尝试在Windows 10上安装pandas python模块。但是当我收到此错误时:
pip install pandas
Collecting pandas
Using cached pandas-1.0.4.tar.gz (5.0 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: still running...
Installing build dependencies: finished with status 'error'
pip : ERROR: Command errored out with exit status 1:
At line:1 char:1
这是完整的错误:https://pastebin.com/dEuEkmGE
我确实安装了numpy和cython:
pip show numpy
Name: numpy
Version: 1.18.4
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: None
License: BSD
Location: c:\users\tdun0002\appdata\local\programs\python\python39\lib\site-packages
Requires:
Required-by:
pip show cython
Name: Cython
Version: 0.29.19
Summary: The Cython compiler for writing C extensions for the Python language.
Home-page: http://cython.org/
Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al.
Author-email: cython-devel@python.org
License: Apache
Location: c:\users\tdun0002\appdata\local\programs\python\python39\lib\site-packages
Requires:
Required-by:
如何克服此错误?
答案 0 :(得分:1)
我在python 2.7.13中遇到这个问题 这是我的解决方案: 1.使用以下命令安装Cython:
pip install Cython
2。安装g ++和gcc
apt-get install gcc, g++
3。卸载熊猫
pip uninstall pandas
4。重新安装熊猫
pip install pandas
然后一切都会好的。
答案 1 :(得分:0)
您可以尝试以下命令:
pip install git+https://github.com/pydata/pandas-datareader.git.
答案 2 :(得分:0)
我安装Python 3.9
时发生了问题。一旦这样做,我将无法使用或安装Pandas。从Python 3.9
降级到Python 3.8
使我可以再次安装Pandas。