pythonsqlitepippysqlciphersqlite-cipher

Issues Installing pysqlcipher3 on Windows 2024


I'm trying to install pysqlcipher3 on Windows, but it seems that the process is mainly designed for Linux. When I attempt to install it using pip, I encounter the following error:

PS D:\josea\José_Andrés\Programación\Pyhton\Codigos\VerificadorEstacionamiento> pip install pysqlcipher3 Collecting pysqlcipher3 Using cached pysqlcipher3-1.2.0.tar.gz (102 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: pysqlcipher3 Building wheel for pysqlcipher3 (setup.py) ... done WARNING: Legacy build of wheel for 'pysqlcipher3' created no files. Command arguments: 'D:\josea\José_Andrés\Programación\Pyhton\Codigos\VerificadorEstacionamiento\venv\Scripts\python.exe' -u -c ' exec(compile('"'"''"'"''"'"'

# This is -- a caller that pip uses to run setup.py

#

# - It imports setuptools before invoking setup.py, to enable projects that directly

# import from distutils.core to work with newer packaging standards.

# - It provides a clear error message when setuptools is not installed.

# - It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

# setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

# manifest_maker: standard file '"'"'-c'"'"' not found".

# - It generates a shim setup.py, for handling setup.cfg-only projects. import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'C:\Users\josea\AppData\Local\Temp\pip-install-1bfv914d\pysqlcipher3_b196db9a45cb4114bcee0627db05c021\setup.py'"'"',), "", "exec"))' bdist_wheel -d 'C:\Users\josea\AppData\Local\Temp\pip-wheel-gxaob0da' Command output: [use --verbose to show] Running setup.py clean for pysqlcipher3 Failed to build pysqlcipher3 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pysqlcipher3)

I have been watching some outdated tutorials that use nmake and other tools, but these videos are from several years ago. They mention that we need to specify the OpenSSL path in the Makefile.msc as C:\Program Files\OpenSSL-Win64\lib\VC\static, but now in 2024, this folder no longer exists. Instead, the path is C:\Program Files\OpenSSL-Win64\lib\VC\x64\ with four folders (MD, MDd, MT, MTd).

I’m stuck at this point, and I need help to successfully install pysqlcipher3 on Windows.

Any advice or updated instructions would be greatly appreciated!


Solution

  • Just with this command on WIndows works:

    pip install pysqlite3-wheels
    

    On Linux:

    pip install pysqlcipher3