ImportError: No Module Named 'pysqlite2'
I wrote a Python program that was done on windows. And in a testing environment, Windows worked fine. Now I am setting up a Linux server to install the program internally. I have installed all dependencies etc. From the generated requirements file, but when I ran it I ran into the problem,
ImportError: No Module Named 'pysqlite2'.
I searched hard for this problem and couldn't find a solution. Can anyone tell me how to fix this issue from the code below? I cannot upload the image due to the reputation is not high enough. Any help would be greatly appreciated. If any other information is needed just for comments and I will upload.
File "/home/ryan/python_p/venv/lib/python3.4/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 334, in dbapi
from pysqlite2 import dbapi2 as sqlite
ImportError: No Module named 'pysqlite2'
As I understand it, sqlite is either incompatible or has compatibility issues?
Another problem that I think is directly related to what's inside the virtual environment and I try to install pip3.4 pysqlite, I get
SyntaxError: Missing Parenthesis in call to 'Print
It suggests installing Sphinx, which I did but didn't cure.
I think these two issues are directly related, and by curing, he should cure the other.
Maybe you just can use sqlite3
which is now part of the standard library and should work exactly the same as pysqlite2. You can try changing the file mentioned:
from pysqlite2 import dbapi2 as sqlite
to
from sqlite3 import dbapi2 as sqlite
Try it pip search sqlite
, you can find many candidates. Choose something like this:
pip install pysqlite