0

I'm running ubuntu 14.04 64-bit. I created a virtual environment via pythonbrew venv using python 2.7.5. I created a django application dependent to opentok python-sdk. When I try to install opentok, it says:

CompressionError: bz2 module is not available.

It works fine using the built in python (/usr/bin/python) But using the python provided py pythonbrew, I encounter the error.

This is not just another bz2 module error that can be solved by correcting paths as mentioned in a possible duplicate of this question. A pythonbrew virtualenv was used here meaning that this should use a different python other than the system python. The answer there suggests linking to the system python which is not very good. A virtual env is being used here to isolate the system python to the specific python I will use for my project.

user3631341
  • 515
  • 2
  • 5
  • 16
  • possible duplicate of [ImportError: No module named bz2 for Python 2.7.2](http://stackoverflow.com/questions/8115280/importerror-no-module-named-bz2-for-python-2-7-2) – rnevius Jun 04 '15 at 08:34

1 Answers1

1

First Install bz2 then try installing it again :

sudo apt-get install libbz2-dev

after give your pip command again . Hopefully it will work

coder3521
  • 2,608
  • 1
  • 28
  • 50
  • bz2 cannot be installed. It says Unable to locate package bz2. And I've already installed libbz2-dev it says it's already the newest version. – user3631341 Jun 04 '15 at 09:17