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,
Robert

Hey, thanks for replying!

I ran perceptilabs -v=3 and it returned the error
"libpython3.7.m.so.1.0: 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

Awesome, glad you found a solution! :slight_smile:

Hey!
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/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/__main__.py", line 9, in <module> management.execute_from_command_line() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/core/management/__init__.py", 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/base.py", line 343, in run_from_argv connections.close_all() File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/utils.py", line 232, in close_all for alias in self: File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/utils.py", line 226, in __iter__ return iter(self.databases) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/utils/functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/db/utils.py", line 153, in databases self._databases = settings.DATABASES File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 82, in __getattr__ self._setup(name) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 69, in _setup self._wrapped = Settings(settings_module) File "/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/django/conf/__init__.py", line 170, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/local/lib/python3.7/importlib/__init__.py", 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: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory Error: Unable to upgrade your perceptilabs database.

1 Like

Hi @Tahsin,

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

All the best,
Robert

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:

@robertl,

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

`Traceback (most recent call last):
File “perceptilabs/lwcore/base.py”, line 132, in perceptilabs.lwcore.base.LightweightCore._compute_layer_results
File “perceptilabs/layers/helper.py”, line 88, in perceptilabs.layers.helper.LayerHelper.get_class
File “perceptilabs/layers/helper.py”, line 85, in perceptilabs.layers.helper.LayerHelper.get_class
File “perceptilabs/layers/helper.py”, line 42, in perceptilabs.layers.helper.load_code_as_module
File “perceptilabs/layers/helper.py”, 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/init.py”, line 7, in
from .manage_plugins import *
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/skimage/io/manage_plugins.py”, line 23, in
from .collection import imread_collection_wrapper
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/skimage/io/collection.py”, line 13, in
from tifffile import TiffFile
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/tifffile/init.py”, line 3, in
from .tifffile import doc, all, version, main
File “/work/outputs/perceptilabs/venv/lib/python3.7/site-packages/tifffile/tifffile.py”, line 13944, in
import lzma
File “/usr/local/lib/python3.7/lzma.py”, 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:

I’m getting a similar error on Windows, but it import a module named api. Any ideas?

perceptilabs
PerceptiLabs: Your environment does not have atari_py installed, so some functionality may not be available
PerceptiLabs: To install it, please follow the directions at https://github.com/Kojoley/atari-py and then install gym through ‘pip install gym[atari]’
Error: Unable to upgrade your perceptilabs database.

perceptilabs -v=3
PerceptiLabs: Your environment does not have atari_py installed, so some functionality may not be available
PerceptiLabs: To install it, please follow the directions at https://github.com/Kojoley/atari-py and then install gym through ‘pip install gym[atari]’
Traceback (most recent call last):
File “c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django\apps\config.py”, line 244, in create
app_module = import_module(app_name)
File “c:\users\dana.conda\envs\plapr6_official\lib\importlib_init_.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘api’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “c:\users\dana.conda\envs\plapr6_official\lib\runpy.py”, line 193, in run_module_as_main
main”, mod_spec)
File “c:\users\dana.conda\envs\plapr6_official\lib\runpy.py”, line 85, in run_code
exec(code, run_globals)
File "c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django_main
.py", line 9, in
management.execute_from_command_line()
File "c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django\core\management_init
.py", line 419, in execute_from_command_line
utility.execute()
File “c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django\core\management_init_.py”, line 395, in execute
django.setup()
File “c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django_init_.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django\apps\registry.py”, line 91, in populate
app_config = AppConfig.create(entry)
File “c:\users\dana.conda\envs\plapr6_official\lib\site-packages\django\apps\config.py”, line 250, in create
app_config_class.qualname,
django.core.exceptions.ImproperlyConfigured: Cannot import ‘api’. Check that ‘rygg.api.apps.ApiConfig.name’ is correct.
Error: Unable to upgrade your perceptilabs database.

2 Likes

Hi @danaf . We were caught by a breaking change in a dependency and we’re working on a release to fix that. As a temporary workaround, can you run pip install --upgrade Django=3.1.8 ?

1 Like

Thanks that worked, PerceptiLabs now runs. Note that the command needs two “=” characters after Django:

pip install --upgrade Django==3.1.8

otherwise the response will be:

ERROR: Invalid requirement: ‘Django=3.1.8’
Hint: = is not a valid operator. Did you mean == ?

1 Like

hello
this is the error I get when running the perceptilabs command on the terminal. I am using anaconda on windows.
Any help is appreciated.

(myenv) C:\Users\zawad>perceptilabs
2021-11-11 13:25:45.882617: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
2021-11-11 13:25:45.882776: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2021-11-11 13:25:49.755981: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘nvcuda.dll’; dlerror: nvcuda.dll not found
2021-11-11 13:25:49.756117: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-11-11 13:25:49.759214: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-UDG0Q5A
2021-11-11 13:25:49.759406: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-UDG0Q5A
INFO: Could not find files for the given pattern(s).
PerceptiLabs: Your environment does not have git installed, so interactions with GitHub will not be available
Error: Unable to upgrade your perceptilabs database.

Hi @Allegiance,
Sorry to hear that you ran into an installation issue!

Would you mind running PerceptiLabs as “perceptilabs -v=3” (this enables more printouts in the terminal) and send the terminal info here so we can take a look at what might have happened? :slight_smile:

Best,
Robert

thanks for the quick reply. This is what is displayed

(myenv) C:\Users\zawad>perceptilabs -v=3
2021-11-11 13:34:45.557223: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
2021-11-11 13:34:45.557385: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2021-11-11 13:34:49.435084: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library ‘nvcuda.dll’; dlerror: nvcuda.dll not found
2021-11-11 13:34:49.435196: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2021-11-11 13:34:49.438300: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: DESKTOP-UDG0Q5A
2021-11-11 13:34:49.438498: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: DESKTOP-UDG0Q5A
INFO: Could not find files for the given pattern(s).
PerceptiLabs: Your environment does not have git installed, so interactions with GitHub will not be available
Traceback (most recent call last):
File “c:\users\zawad\anaconda3\envs\myenv\lib\runpy.py”, line 194, in run_module_as_main
return run_code(code, main_globals, None,
File “c:\users\zawad\anaconda3\envs\myenv\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django_main
.py", line 9, in
management.execute_from_command_line()
File "c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django\core\management_init
.py", line 419, in execute_from_command_line
utility.execute()
File "c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django\core\management_init
.py", line 395, in execute
django.setup()
File “c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django_init_.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django\apps\registry.py”, line 114, in populate
app_config.import_models()
File “c:\users\zawad\anaconda3\envs\myenv\lib\site-packages\django\apps\config.py”, line 301, in import_models
self.models_module = import_module(models_module_name)
File “c:\users\zawad\anaconda3\envs\myenv\lib\importlib_init_.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 1174, in exec_module
File “”, line 219, in _call_with_frames_removed
File “rygg\api\models.py”, line 12, in init rygg.api.models
File “rygg\api\tasks.py”, line 1, in init rygg.api.tasks
ModuleNotFoundError: No module named ‘celery.decorators’
Error: Unable to upgrade your perceptilabs database.

Hi @Allegiance (nice handle, BTW :wink: )

@robertl will sort out the dB issue, I just wanted so say “Hi!” and welcome, and if you do have a GPU but also have CUDA issues (I’m just looking at the opening few lines of your 1st post and see the dll’s didn’t initialise) do let me know, I think I have enough practical experience now to be able to help (sometimes)

Meanwhile… I’m always on the lookout for new users I can learn from - or assist (see above :slight_smile: ) Do you have a lot of ML experience or is this also a learning opportunity for you? Although I also do TensorFlow in pure Python I’ve found PL remarkably helpful in speed & simplicity when starting something new.

And if you don’t mind me asking, what are you looking to achieve with PL? There are already a number of active users with really interesting use-cases (brain function, image enhancement, to name just a couple) - hope you find some synergy here.

I’m a bit behind the curve on exploiting PL at the moment because I’m more focussed on a complex physics regression, but I’m also currently “researching” (in an amateur way) some ML theory, i.e the “double descent” phenomenon described in the PL blog and the neural network generalisation puzzle generally. (I’m looking at PL to show me the evolution of the loss curve without having to mess around with callbacks, TensorBoard etc.)

If you’re interested in ML theory or regressions that would also be nice to know!

Anyway - hope to see you around once you’re up and running!

Hi @JulianSMoore , I am also a newbie in ML but have a deep interest in understanding neural networks and deep learning.
From what I have seen, I believe PL will help me achieve my goal due to its simplicity. I intend to come up with an image recognition system to be used for fault detection in electrical and electronic equipment.
Hoping to learn alot also :wink: