Error: Unable to upgrade your perceptilabs database

Hi there,

I’m getting this error:

Error: Unable to upgrade your perceptilabs database

after installing whenever I try to open perceptilab from the terminal.

I am using ubuntu 20.04, I have installed perceptilabs to a virtual environment running Python3.7

not sure if the following is helpful or relevant to the problem but I did have some issues while trying to install percept labs initially. pyJWT and tensorflow both had packages that were incompatible. Reinstalling tensorflow solved tensorflows issue and downgrading pyJWT from 2.0 to 1.7.1 fixed the other.

Hi @presidentdoggo

Have you tried installing perceptilabs in a completely new, clean environment?

Also, would you mind running “perceptilabs -v=3” and printing the output here? That way we can take a look at where it might have crashed :slight_smile:

Happy Holidays!
All the best,

Hey, thanks for replying!

I ran perceptilabs -v=3 and it returned the error
" cannot open shared object file: No such file or directory "

I just ran

sudo apt-get install libpython3.7

and perceptilabs now loads up just fine and I’m able to access the UI :smiley:

Awesome, glad you found a solution! :slight_smile:

I’m getting the same error. I can’t get mine to run even after installing libpython3.7

running “perceptilabs -v=3” :

Traceback (most recent call last): File "/usr/local/lib/python3.7/", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.7/", line 85, in _run_code exec(code, run_globals) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/", line 9, in <module> management.execute_from_command_line() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/core/management/", line 401, in execute_from_command_line utility.execute() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/core/management/", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/core/management/", line 343, in run_from_argv connections.close_all() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/", line 232, in close_all for alias in self: File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/", line 226, in __iter__ return iter(self.databases) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/utils/", line 48, in __get__ res = instance.__dict__[] = self.func(instance) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/", line 153, in databases self._databases = settings.DATABASES File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/", line 82, in __getattr__ self._setup(name) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/", line 69, in _setup self._wrapped = Settings(settings_module) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/", line 170, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.7/importlib/", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 670, in _load_unlocked File "<frozen importlib._bootstrap>", line 583, in module_from_spec File "<frozen importlib._bootstrap_external>", line 1043, in create_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed ImportError: cannot open shared object file: No such file or directory Error: Unable to upgrade your perceptilabs database.

Hi @Tahsin,

What kind of environment are you running it in, and what OS?

All the best,

Hey, @robertl,
sorry for the late reply.
I’m on pop-os 20.10. I actually fixed the problem. I was using python 3.7.9. I downgraded to 3.7.5 and perceptilabs ran properly.
But I can’t get it to run any code. It gives me ModuleNotFoundError: No module named '_lzma. Can’t seem to fix this.

Great to here that downgrading fixed that issue!

Do you have more of the log from that crash? Then I can dig into it a bit :slight_smile:


This is the error I get in the error tab in a model:

`Traceback (most recent call last):
File “perceptilabs/lwcore/”, line 132, in perceptilabs.lwcore.base.LightweightCore._compute_layer_results
File “perceptilabs/layers/”, line 88, in perceptilabs.layers.helper.LayerHelper.get_class
File “perceptilabs/layers/”, line 85, in perceptilabs.layers.helper.LayerHelper.get_class
File “perceptilabs/layers/”, line 42, in perceptilabs.layers.helper.load_code_as_module
File “perceptilabs/layers/”, line 35, in perceptilabs.layers.helper._CodeLoader.exec_module
File “<rendered-code: 1598915800150 [DataData]>”, line -15, in

File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/skimage/io/”, line 7, in
from .manage_plugins import *
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/skimage/io/”, line 23, in
from .collection import imread_collection_wrapper
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/skimage/io/”, line 13, in
from tifffile import TiffFile
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/tifffile/”, line 3, in
from .tifffile import doc, all, version, main
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/tifffile/”, line 13944, in
import lzma
File “/usr/local/lib/python3.7/”, line 27, in
from _lzma import *
ModuleNotFoundError: No module named ‘_lzma’`

Hmm, seems like it just didn’t install skimage correctly.
Did you install PerceptiLabs in a fresh new Anaconda environment?

Since you downgraded it to 3.7.5 it could be worth creating a new env from that python version and then reinstall everything in there to make sure everything is installed properly.

If that still didn’t work there seems to be a fair bit of threads on Google about the issue ModuleNotFoundError: No module named ‘_lzma’ which may help you, but by looking through a few they all seem to relate to something in the environment being wrong.

1 Like

@robertl reinstalling everything in a new env worked. Thanks.

1 Like

Great to hear it! :slight_smile: