本文介绍了在具有python3支持的virtualenv中安装pysqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用以下方法创建了virtualenv:
I've created virtualenv with:
mkvirtualenv -p /usr/bin/python3.4 django
之后,我尝试安装pysqlite:
After, I tried install pysqlite:
pip install pysqlite
但是我得到了
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
似乎pip尝试使用python2.我该如何解决?
It seems that pip try use python2. How can I resolve this?
推荐答案
没有适用于Python 3.x的pysqlite的公共版本.对于Python 3.x,标准库中的sqlite3模块是pysqlite的最新版本.
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.
这篇关于在具有python3支持的virtualenv中安装pysqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!