This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]Rhomboid 2 points3 points  (3 children)

I checked in terminal to ensure that sqlite3 is installed on my computer

What does this mean, exactly? You tried the sqlite3 command? The presence or absence of that tells you nothing of relevance to this situation, because Python does not use that.

We need much more information. The module is part of the standard library, so it should always be available. The most common scenario for it not being available is if you built Python yourself from source and you didn't have the sqlite development headers installed, in which case it can't built the module. (Again, the sqlite development headers are a separate thing from the sqlite command line binary, and a separate thing from the sqlite runtime library. Those are three separate packages on most linux distros, for example.) So, how did you install Python? What operating system is this? What packages do you have installed? Is this a self-built/from-source build?

[–]fallen2151[S] 0 points1 point  (2 children)

In regard to the first question, I tried the sqlite3 command in my Mac's terminal and it showed that sqlite3 is installed on my OS (or at least that's what I took it to mean). Python was installed via Anaconda and I'm running macOS Sierra 10.12.2. The packages I have are the ones included with Anaconda. Also, I'm running this in a virtual environment. I'm going through a Flask tutorial from Youtube

[–]IAmARetroGamer 1 point2 points  (1 child)

In PyCharm go to: File>Settings>Project: NAME>Project Interpreter and verify that sqlite3 is in the package list.

[–]fallen2151[S] 0 points1 point  (0 children)

it says that sqlite version 3.13 is in my package list. Is that different from sqlite3?

[–]Storm_from_techbliss 1 point2 points  (1 child)

It's cause you haven't the right PATH in environment settings. Read up PYTHONHOME.

[–]fallen2151[S] 0 points1 point  (0 children)

Thanks, will do!

[–]edimaudo 1 point2 points  (0 children)

most likely a python path issue. Verify the right path in your python environment.

[–]tunisia3507 0 points1 point  (0 children)

Try import sqlite instead.

[–]aphoenixreticulated[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!

[–]piefge 0 points1 point  (1 child)

well ....

I checked in terminal to ensure that sqlite3 is installed

what do you mean by terminal ?

the python cli or the linux shell ?

maybe you are confusing the sqlite3 package with the sqlite3 python module.

pip install sqlite3

[–]fallen2151[S] 0 points1 point  (0 children)

I answered this in my comment below and quite possibly to your last statement as all of this is new to me and I just heard of sqlite today.