Open Dillon868 opened 2 years ago
Did you follow the installation instructions (https://github.com/nlohmann/mutate_cpp#installation)? What OS are you using?
I did follow the instructions. I’m using Windows 10
Before calling
python3 db_create.py
did you source the environment? That said, can you make sure you actually call venv/bin/python3
?
Same error on Ubuntu 22.04.
I ran:
pip install virtualenv
virtualenv -p python3 venv
venv/bin/python3 db_create.py
Same error as above:
ModuleNotFoundError: No module named 'migrate'
As you mentioned, did I install the requirements? I had not, so next I ran:
venv/bin/pip install -r requirements.txt
venv/bin/python3 db_create.py
New error, now SQL Alchemy is missing (although I see it being installed by pip
):
ModuleNotFoundError: No module named 'sqlalchemy.databases'
Here is the output of pip3
to make sure everything is installed for python3
:
$ venv/bin/pip3 install -r requirements.txt
Requirement already satisfied: appdirs>=1.4.4 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (1.4.4)
Requirement already satisfied: Brotli>=1.0.9 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (1.0.9)
Requirement already satisfied: click>=8.0.3 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (8.1.6)
Requirement already satisfied: decorator>=5.1.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (5.1.1)
Requirement already satisfied: Flask>=2.0.2 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 5)) (2.3.2)
Requirement already satisfied: Flask-Compress>=1.10.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 6)) (1.13)
Requirement already satisfied: Flask-Humanize>=0.3.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 7)) (0.3.0)
Requirement already satisfied: Flask-SQLAlchemy>=2.5.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 8)) (3.0.5)
Requirement already satisfied: Flask-WTF>=1.0.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 9)) (1.1.1)
Requirement already satisfied: humanize>=4.0.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 10)) (4.7.0)
Requirement already satisfied: itsdangerous>=2.0.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 11)) (2.1.2)
Requirement already satisfied: Jinja2>=3.0.3 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 12)) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 13)) (2.1.3)
Requirement already satisfied: packaging>=21.3 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 14)) (23.1)
Requirement already satisfied: pbr>=5.8.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 15)) (5.11.1)
Requirement already satisfied: psutil>=5.9.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 16)) (5.9.5)
Requirement already satisfied: pyparsing>=3.0.7 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 17)) (3.1.0)
Requirement already satisfied: python-utils>=3.1.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 18)) (3.7.0)
Requirement already satisfied: six>=1.16.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 19)) (1.16.0)
Requirement already satisfied: SQLAlchemy>=1.4.31 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 20)) (2.0.19)
Requirement already satisfied: sqlalchemy-migrate>=0.13.0 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 21)) (0.13.0)
Requirement already satisfied: sqlparse>=0.4.2 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 22)) (0.4.4)
Requirement already satisfied: Tempita>=0.5.2 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 23)) (0.5.2)
Requirement already satisfied: Werkzeug>=2.0.3 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 24)) (2.3.6)
Requirement already satisfied: WTForms>=3.0.1 in ./venv/lib/python3.10/site-packages (from -r requirements.txt (line 25)) (3.0.1)
Requirement already satisfied: blinker>=1.6.2 in ./venv/lib/python3.10/site-packages (from Flask>=2.0.2->-r requirements.txt (line 5)) (1.6.2)
Requirement already satisfied: typing-extensions>3.10.0.2 in ./venv/lib/python3.10/site-packages (from python-utils>=3.1.0->-r requirements.txt (line 18)) (4.7.1)
Requirement already satisfied: greenlet!=0.4.17 in ./venv/lib/python3.10/site-packages (from SQLAlchemy>=1.4.31->-r requirements.txt (line 20)) (2.0.2)
Maybe there are incompatible packages... Could you try replacing all >=
entries in the requirements.txt with ==
and set up the virtual environment again?
That worked! :-)
I can now see the site. That may have other issues, but I suspect that it will work as expected.
Thank you.
After running python3 db_create.py the following error occurred: File "C:\Users\Admin\Desktop\mutate_cpp-master\db_create.py", line 3, in
from migrate.versioning import api
ModuleNotFoundError: No module named 'migrate'
Any advice would be appreciated.