Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #82506

How to import sqlite3 in my python3.4 successfully?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <elearn2014@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.062
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'importerror:': 0.07; 'skip:/ 10': 0.09; 'subject:How': 0.10; 'python': 0.11; '2.7.3': 0.16; '23,': 0.16; 'debian.': 0.16; 'mkdir': 0.16; 'sqlite': 0.16; 'subject:import': 0.16; 'subject:sqlite3': 0.16; 'sudo': 0.16; 'url:ftp': 0.16; 'module': 0.19; '>>>': 0.22; 'import': 0.22; 'install': 0.23; 'header:User-Agent:1': 0.23; '&gt;&gt;&gt;': 0.24; 'skip:l 30': 0.24; 'compiled': 0.26; 'installed': 0.27; '"",': 0.31; 'python2.7': 0.31; 'file': 0.32; 'linux': 0.33; 'url:python': 0.33; '(most': 0.33; 'skip:_ 10': 0.34; 'received:google.com': 0.35; 'there': 0.35; 'version': 0.36; 'skip:" 50': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'skip:- 20': 0.37; 'two': 0.37; 'message-id:@gmail.com': 0.38; 'skip:& 10': 0.38; 'nov': 0.38; 'version,': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'charset:gbk': 0.60; 'url:3': 0.61; 'skip:n 10': 0.64; 'more': 0.64; 'url:0': 0.67; 'mar': 0.68; '26,': 0.68; 'default': 0.69; 'url:4': 0.69; './configure': 0.84; '2014,': 0.84; 'apt-get': 0.84; 'skip:/ 30': 0.84; 'skip:| 10': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=9NbnroTZRJkvNgffIQHiIFNRvyb/dFlxzZEORuvPU+I=; b=itdamZJNnFhhyvV1xRTjYXHN8KupXeLBG0WzkeOBtNYYzK9cCmk2k6gZxz33LEdcc5 Cx441oPaxH3YMyIfYkKBryL8b53+tjsVS2UC0iG6/RJ6BHomvF4trXP3Q6ve0fBqhhH9 MXMM/iaL5JRPNpmH/5VyJJ6JsioOE01mSEpzZAZjx3+5Z6aXj9mHvX4N+QyykTSA3EG1 mRjUOlkFpMpT9JuxIXKqnECVYBYOExdDWk3D0kzfBMROdH6+ewk0bidtreZiprtrfnj6 o2xOeMS0sNOi87UQC8vKO/HN0gP+x3EwZ8UB9Adiyyc8M7mUrBVu1zLaq3+TruWWDOOS v2Hg==
X-Received by 10.66.231.200 with SMTP id ti8mr42534015pac.41.1418569610259; Sun, 14 Dec 2014 07:06:50 -0800 (PST)
Date Sun, 14 Dec 2014 23:06:11 +0800
From sir <elearn2014@gmail.com>
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version 1.0
To python-list@python.org
Subject How to import sqlite3 in my python3.4 successfully?
Content-Type multipart/alternative; boundary="------------070607090008040304080300"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16948.1418569618.18130.python-list@python.org> (permalink)
Lines 104
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418569618 news.xs4all.nl 2834 [2001:888:2000:d::a6]:36723
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82506

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

There are two python version in my debian7, one is python2.7 the system 
default version, the other is python3.4 which compiled to install this way.

|  apt-get  update
  apt-get  upgrade
  apt-get  install build-essential
  wget http://www.python.org/ftp/python/3.4.0/Python-3.4.0.tgz
  tar-zxvfPython-3.4.0.tgz
  cdPython-3.4.0
  mkdir/usr/local/python3.4
  ./configure--prefix=/usr/local/python3.4
  make
  make install
  ln-s/usr/local/python3.4/bin/python3.4    /usr/bin/python3.4
  ln-s/usr/local/python3.4/bin/pip3.4    /usr/bin/pip3.4|

I have installed sqlite this way on my debian.

|sudo apt-get  install sqlite3 libsqlite3-dev|

In python2.7

|root@rebuild:~#  python
Python  2.7.3  (default,  Mar  14  2014,  11:57:14)
[GCC4.7.2]  on linux2
Type  "help",  "copyright",  "credits"  or  "license"  for  more information.
>>>  import  sqlite3|

In python3.4

|root@rebuild:~#  python3.4
Python  3.4.0  (default,  Nov  27  2014,  13:54:17)
[GCC4.7.2]  on linux
Type  "help",  "copyright",  "credits"  or  "license"  for  more information.
>>>  import  sqlite3
Traceback  (most recent calllast):
   File  "<stdin>",  line1,  in  <module>
   File  "/usr/local/python3.4/lib/python3.4/sqlite3/__init__.py",  line23,  in  <module>
     from  sqlite3.dbapi2import  *
   File  "/usr/local/python3.4/lib/python3.4/sqlite3/dbapi2.py",  line26,  in  <module>
     from  _sqlite3import  *
ImportError:  No  module  named'_sqlite3'|

How can i import sqlite3 in my python3.4 successfully?

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

How to import sqlite3 in my python3.4 successfully? sir <elearn2014@gmail.com> - 2014-12-14 23:06 +0800
  Re: How to import sqlite3 in my python3.4 successfully? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-12-15 05:06 +0100

csiph-web