'bz2 is module not available' when installing Pandas with pip in python virtual environment

后端 未结 3 1428
北海茫月
北海茫月 2021-01-13 12:51

I am going through this post Numpy, Scipy, and Pandas - Oh My!, installing some python packages, but got stuck at the line for installing Pandas:

pip install         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-13 13:40

    You need to build python with BZIP2 support.

    Install the following package before building python:

    • Red Hat/Fedora/CentOS: yum install bzip2-devel
    • Debian/Ubuntu: sudo apt-get install libbz2-dev

    Extract python tarball. Then

    configure;
    make;
    make install
    

    Install pip using the new python.

    Alternative:

    Install a binary python distribution using yum or apt, that was build with BZIP2 support.

    See also: ImportError: No module named bz2 for Python 2.7.2

提交回复
热议问题