Skip to content

Brownie not running after installation: No module named '_sqlite3' #1663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jamiehewitt15 opened this issue Jan 22, 2023 · 3 comments
Open

Comments

@jamiehewitt15
Copy link

jamiehewitt15 commented Jan 22, 2023

Environment information

  • brownie Version: 1.19.2
  • ganache-cli Version: 7.7.3
  • Python Version: 3.9.2
  • OS: Ubuntu 22.04.1 LTS

What was wrong?

When I run brownie I get the following error:

$ brownie

Traceback (most recent call last):
  File "/home/jamie/.local/bin/brownie", line 5, in <module>
    from brownie._cli.__main__ import main
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/__init__.py", line 6, in <module>
    from brownie.project import compile_source, run
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/project/__init__.py", line 3, in <module>
    from .main import (  # NOQA 401
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/project/main.py", line 45, in <module>
    from brownie.network import web3
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/__init__.py", line 4, in <module>
    from .account import Accounts
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/account.py", line 37, in <module>
    from .gas.bases import GasABC
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/gas/bases.py", line 7, in <module>
    from brownie.network.web3 import web3
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/web3.py", line 20, in <module>
    from brownie.network.middlewares import get_middlewares
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/middlewares/__init__.py", line 107, in <module>
    module = importlib.import_module(f"{__package__}.{path.stem}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/network/middlewares/caching.py", line 12, in <module>
    from brownie.utils.sql import Cursor
  File "/home/jamie/.local/lib/python3.9/site-packages/brownie/utils/sql.py", line 4, in <module>
    import sqlite3
  File "/usr/local/lib/python3.9/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.9/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

I have tried all three installation methods of brownie and they all lead to the same error. I would appreciate any help fixing this issue.

@jamiehewitt15 jamiehewitt15 changed the title Brownie not running after installation: Brownie not running after installation: No module named '_sqlite3' Jan 22, 2023
@jamiehewitt15
Copy link
Author

I also tried installing a couple of different versions of python to see if there was something to do with the version or installation that was causing this issue. So far whatever I try it always leads to the exact same No module named '_sqlite3' error

@jamiehewitt15
Copy link
Author

Eventually managed to get round this by using brownie with python 3.8.9

@VersoriumX
Copy link

well done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants