Unable to import sqlite3 using Anaconda Python

前端 未结 5 1002
一整个雨季
一整个雨季 2020-11-30 08:16

I am trying to do the following in Python 3.7.1 on Windows

import sqlite3

but I get the following error message

Traceback (         


        
相关标签:
5条回答
  • 2020-11-30 09:00

    I put the sqlite3.dll in the path folder of my Python venv and still wont work. I suspected it is a path problem.

    (In my case: E:\Virtual_Env\mini_zinc\env\Scripts)

    I found in my case I messed up installation in a virtual evn, somehow using an anaconda python kernel within a Python venv.

    I reinstall the Python Venv and check the python version after installed Env is correct (not the Anaconda python), then proceed with Jupyter Notebook (or Juyterlab) and works fine.

    0 讨论(0)
  • 2020-11-30 09:07

    I got this working on windows by downloading: the sqlite3 dll (find your system version)

    And putting into the folder: C:\Users\YOURUSER\Anaconda3\DLLs

    (Depending on how you installed Anaconda, this may have to be placed into the following folder: C:\ProgramData\Anaconda3\DLLs)

    0 讨论(0)
  • 2020-11-30 09:16

    Locate the sqlite3.dll file. In my case it was in following folder

    C:\Users\Admin\anaconda3\Library\bin 
    

    where C:\Users\Admin\anaconda3 is the folder where Anaconda was installed

    Add this to PATH in environment variables, and it should work then.

    0 讨论(0)
  • 2020-11-30 09:18

    Please check https://github.com/jupyter/notebook/issues/4332 I added anaconda root/Library/bin to my PATH and now it works!

    0 讨论(0)
  • 2020-11-30 09:19

    before executing the program, enter conda activate in your shell.

    0 讨论(0)
提交回复
热议问题