Problems Installing local Galaxy - no module found _sqlite3

Hello, I’m new to Galaxy and I’m currently trying to get Galaxy (version 20.01) onto a Linux machine (os: Linux-3.10.0-1062.1.2.el7.x86_64). I followed the instructions on https://galaxyproject.org/admin/get-galaxy/.

I began by cloning a new galaxy repository:
$ git clone -b release_20.01 https://github.com/galaxyproject/galaxy.git

Then I started it up:
$ sh run.sh

It all seems to run smoothly until I get to this section:
*** Operational MODE: threaded ***
added lib/ to pythonpath.
Traceback (most recent call last):
File “lib/galaxy/webapps/galaxy/buildapp.py”, line 12, in
import galaxy.app
File “lib/galaxy/app.py”, line 20, in
from galaxy.managers.interactivetool import InteractiveToolManager
File “lib/galaxy/managers/interactivetool.py”, line 2, in
import sqlite3
File “/usr/local/python_v3.7.1/lib/python3.7/sqlite3/init.py”, line 23, in
from sqlite3.dbapi2 import *
File “/usr/local/python_v3.7.1/lib/python3.7/sqlite3/dbapi2.py”, line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3’
unable to load app 0 (mountpoint=’’) (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 24316, cores: 4)
Exception ignored in: <function _releaseLock at 0x7f4f5befc400>
Traceback (most recent call last):
File “/usr/local/python_v3.7.1/lib/python3.7/logging/init.py”, line 226, in _releaseLock
_lock.release()
RuntimeError: cannot release un-acquired lock
Ignoring exception from logging atfork Exception ignored in: <function _after_at_fork_weak_calls at 0x7f4f5befc6a8>
Traceback (most recent call last):
File “/usr/local/python_v3.7.1/lib/python3.7/logging/init.py”, line 269, in _after_at_fork_weak_calls
_at_fork_weak_calls(‘release’)
File “/usr/local/python_v3.7.1/lib/python3.7/logging/init.py”, line 261, in _at_fork_weak_calls
method_name, “method:”, err, file=sys.stderr)
File “/usr/local/python_v3.7.1/lib/python3.7/logging/init.py”, line 1066, in repr
name += ’ ’
TypeError: unsupported operand type(s) for +=: ‘int’ and ‘str’

We’ve installed pysqlite3 and the sqlite-devel linux package but this doesn’t seem to resolve the issue.

Any help would be greatly appreciated. Thank you!

1 Like

Hi @G_Lab

It appears that the system python is being used instead of conda python. That can lead to odd problems. And not just during the initial start-up phase, but later within the application itself (core functionality issues, tool dependency problems).

Try creating a virtualenv .venv in your ../galaxy/ directory and allowing Galaxy to manage dependencies. Shut down Galaxy first, add the .venv, then rerun sh run.sh. If that doesn’t work, try again with a fresh checkout.

Simple instructions are here, for OSX, but it describes the general process that you can adapt it for your OS: Example step-by-step for a basic local Galaxy install with an admin account created

More about dependency resolvers is covered in the Galaxy Admin docs here:

Let us know how this goes, and we can help more if needed.

Thanks!

cc @dannon (he suggested the first-pass solution above)