0

I am trying to run Python3 application in linux server. Application breaks when it tries to use Pandas library. I have tried the solution in No module named '_bz2' in python3 But it gives me No package libbz2-dev available. And also this solution missing python bz2 module Could you please help me with this.

Python environment is,

  • OS Name - Red Hat Enterprise Linux Server
  • Version - 7.7 (Maipo)
  • Python - 3.5.6
  • Pandas - 0.25.3
  • python-dateutil==2.8.1
  • pytz==2019.1
  • six==1.14.0
  • numpy==1.18.1

Thanks

  • Does this answer your question? [missing python bz2 module](https://stackoverflow.com/questions/12806122/missing-python-bz2-module) – shivankgtm Feb 20 '20 at 07:00
  • Thanks for your answer. Apparently I solved the issue. I removed python from the system and installed it back. By using this. https://stackoverflow.com/questions/8087184/installing-python-3-on-rhel – anushanram Feb 20 '20 at 11:46

1 Answers1

1

Probably as you built python from source, you don't have bz2 headers.

Install them on Ubuntu/Debian:

sudo apt-get install libbz2-dev

centos\Fedora:

sudo yum install bzip2-devel

And build python again.

haoran920
  • 17
  • 2