我正在浏览这篇文章Numpy, Scipy, and Pandas - Oh My! ,安装一些 python 包,但在安装 Pandas 时卡住了:
pip install -e git+https://github.com/pydata/pandas#egg=pandas
我将最新版本的“wesm”更改为“pydata”,与该帖子的唯一不同之处在于我使用的是 pythonbrew。
我找到了this post ,与错误有关,但是答案中提到的 bz2 的 Makefile 在哪里?有没有其他方法可以解决这个问题?
任何帮助将非常感激。谢谢。
最佳答案
您需要构建具有 BZIP2 支持的 python。
安装以下包在构建 python 之前 :
yum install bzip2-devel
sudo apt-get install libbz2-dev
提取python tarball。然后
configure;
make;
make install
安装 pip
使用新的python。备选:
使用 yum 或 apt 安装二进制 python 发行版,该发行版是使用 BZIP2 支持构建的。
另见:ImportError: No module named bz2 for Python 2.7.2
关于python - 在 python 虚拟环境中使用 pip 安装 Pandas 时出现“bz2 模块不可用”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22346269/