2

I am trying to run the BoltzTraP2 software installed in Ubuntu 20.04.1 LTS but I get this error. Kindly let me know how I can solve this. I have installed pandas and liblzma-dev, still I get the error.

==========================================================
 you can install pyfftw to get better FFT performance
Traceback (most recent call last):
  File "/home/syl2/.local/bin/btp2", line 11, in <module>
    load_entry_point('BoltzTraP2==20.7.1', 'console_scripts', 'btp2')()
  File "/home/syl2/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 473, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/home/syl2/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/home/syl2/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2447, in load
    return self.resolve()
  File "/home/syl2/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2453, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.8/site-packages/BoltzTraP2/interface.py", line 58, in <module>
    import BoltzTraP2.serialization
  File "/usr/local/lib/python3.8/site-packages/BoltzTraP2/serialization.py", line 32, in <module>
    import lzma
  File "/usr/local/lib/python3.8/lzma.py", line 27, in <module>
    from _lzma import *
ModuleNotFoundError: No module named '_lzma'
Jad
  • 178
Sauko
  • 39

1 Answers1

1

I am so sorry, the previous answer is wrong.

Forget everything about that pylzma thing. And if you modified something, undo it, and I am so sorry I lead you to this path. I got a correct answer based on this post:

https://github.com/ultralytics/yolov5/issues/1298

Briefly, pip install lzma will not work, do it instead:

pip install backports.lzma

and go to your python directory:

cd /usr/local/lib/python3.8

and you will modify your lzma.py file. I could only do this with higher permission level, so I did

sudo nano lzma.py

In the beginning, there are two lines

from _lzma import *
from _lzma import _encode_filter_properties, _decode_filter_properties

Modify them to

from backports.lzma import *
from backports.lzma import _encode_filter_properties, _decode_filter_properties

and save and close the file. Boltztrap2 may work now.

zx485
  • 2,865