mttr
mttr

Reputation: 795

DataStax OpsCenter 5.1.0 fails to start due to python 'ImportError'

Trying to start a tarball installation of OpsCenter 5.1.0 on Ubuntu 14.04 64-bit by running ./opscenter in /opt/opscenter-5.1.0/bin fails with the following error:

Traceback (most recent call last): File "./bin/twistd", line 28, in <module> from twisted.scripts.twistd import run ImportError: cannot import name run

My version of python is 2.7.6:
$ python --version Python 2.7.6

And trying to import twisted results in:
$ python -c "import twisted; print twisted" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named twisted

The value of PYTHONPATH from opscenter looks as follows:
PYTHONPATH: ./src:/usr/lib/python2.7/site-packages:./src/lib/python2.7/site-packages:./lib/python2.7/site-packages:./lib/py:./lib/py-debian/2.7/amd64::

What is going wrong here and can someone suggest a workaround that is worth trying to a Python newbie?

Upvotes: 0

Views: 343

Answers (1)

mttr
mttr

Reputation: 795

The problem was due to missing symbolic links between the bundled python libraries. In particular, in /lib/py-debian/2.7/amd64/twisted the symoblic links to the contents of the py-unpure directory for the files _version.py, plugin.py, init.py and copyright.py were missing.

Originally, I used gradle's copy from tarTree to extract the archive, which resulted in the missing symoblic links. Using tar -xzf instead resolves the issue and opscenter starts up as expected.

Upvotes: 1

Related Questions