Задать вопрос
@Leqort

Как убрать ошибку при установке sqlite3?

При установке sqlite3 вылезает вот такая ошибка, как пофиксить?
pip install pysqlite3
Collecting pysqlite3
  Using cached pysqlite3-0.5.0.tar.gz (40 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pysqlite3
  Building wheel for pysqlite3 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\pysqlite3
      copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
      copying pysqlite3\__init__.py -> build\lib.win-amd64-cpython-311\pysqlite3
      running build_ext
      Builds a C extension linking against libsqlite3 library
      building 'pysqlite3._sqlite3' extension
      error: <b>Microsoft Visual C++ 14.0 or greater is required</b>. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pysqlite3
  Running setup.py clean for pysqlite3
Failed to build pysqlite3
Installing collected packages: pysqlite3
  Running setup.py install for pysqlite3 ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pysqlite3 did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      running install
      C:\Games\Python\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\pysqlite3
      copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
      copying pysqlite3\__init__.py -> build\lib.win-amd64-cpython-311\pysqlite3
      running build_ext
      Builds a C extension linking against libsqlite3 library
      building 'pysqlite3._sqlite3' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pysqlite3

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
  • Вопрос задан
  • 1665 просмотров
Подписаться 1 Простой 2 комментария
Решения вопроса 1
@Develper
на сколько я помню sqlite3 это стандартная библиотека, которую достаточно импортировать import sqlite3
Ответ написан
Пригласить эксперта
Ответы на вопрос 1
Chaki09
@Chaki09
fullstack web developer
Установи "Microsoft Visual C++ 14.0 или выше, в ошибке так и написано)
"Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-buil... "
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы