I've created virtualenv with:
mkvirtualenv -p /usr/bin/python3.4 django
After, I tried install pysqlite:
pip install pysqlite
But I got:
Downloading/unpacking pysqlite
Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
Running setup.py (path:/home/sigo/.virtualenvs/django/build/pysqlite/setup.py) egg_info for package pysqlite
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/sigo/.virtualenvs/django/build/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/sigo/.virtualenvs/django/build/pysqlite/setup.py", line 85
print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
^
SyntaxError: invalid syntax
It seems that pip try use python2. How can I resolve this?
Using virtualenv allows you to avoid installing Python packages globally which could break system tools or other projects. You can install virtualenv using pip. Unix/macOS python3 -m pip install --user virtualenv Windows py -m pip install --user virtualenv Creating a virtual environment¶
You must have the following packages installed on your system. You must have Python 3 and PIP installed on your system. We use virtualenv package to create virtual environment for the Python applications. So first install virtualenv Python module using command:
Python interface to SQLite 3. pysqlite is an interface to the SQLite 3.x embedded relational database engine. It is almost fully compliant with the Python database API version 2.0 also exposes the unique features of SQLite.
If you're working with Python 3, you must install virtualenv using pip3. pip3 is not installed on the server by default. You must first install a custom version of Python 3. This custom installation of Python 3 will also contain pip3. After it's installed and activated, run the which python3 command as shown in the article.
There is no public version of pysqlite for Python 3.x. For Python 3.x, the sqlite3 module in the standard library is the most up-to date version of pysqlite there is.
I'm following this procedure to include the JSON1 extension for SQLite.
When running the
python setup.py install
command for pysqlite
within a virtual environment (miniconda
) I receive the following output:
pysqlite is not supported on Python 3. When using Python 3, use the sqlite3 module from the standard library.
Setting
export LD_LIBRARY_PATH=~/bin/jqlite/lib
doesn't change this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With