Install pysqlcipher3 windows - python

I need to install pysqlcipher on my windows computer but when I do:
pip install pysqlcipher
I have:
Collecting pysqlcipher3
Using cached https://files.pythonhosted.org/packages/a4/06/1d56bdec3129eff6dd54323d249784ccd90ce03c8cae7870d45e434bae77/pysqlcipher3-1.0.3.tar.gz
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: 'C:\Users\Elouan\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Elouan\\AppData\\Local\\Temp\\pip-install-827zddbs\\pysqlcipher3\\setup.py'"'"'; __file__='"'"'C:\\Users\\Elouan\\AppData\\Local\\Temp\\pip-install-827zddbs\\pysqlcipher3\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Elouan\AppData\Local\Temp\pip-wheel-jkj29o6_' --python-tag cp38
Command output: [use --verbose to show]
Running setup.py clean for pysqlcipher3
Failed to build pysqlcipher3
Installing collected packages: pysqlcipher3
Running setup.py install for pysqlcipher3 ... done
Successfully installed pysqlcipher3
WARNING: You are using pip version 19.2.3, however version 20.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I have tried to install it with git and I have:
python setup.py build
running build
running build_py
running build_ext
Builds a C extension linking against libsqlcipher library
building 'pysqlcipher3._sqlite3' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMODULE_NAME=\"pysqlcipher3.dbapi2\" -IC:\Users\Elouan\AppData\Local\Programs\Python\Python37\include -IC:\Users\Elouan\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IF:\Windows Kits\10\include\10.0.18362.0\ucrt" "-IF:\Windows Kits\10\include\10.0.18362.0\shared" "-IF:\Windows Kits\10\include\10.0.18362.0\um" "-IF:\Windows Kits\10\include\10.0.18362.0\winrt" "-IF:\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc\python3\module.c /Fobuild\temp.win-amd64-3.7\Release\src\python3\module.obj
module.c
C:\Users\Elouan\pysqlcipher3\src\python3\connection.h(33): fatal error C1083: Impossible d'ouvrir le fichier include : 'sqlcipher/sqlite3.h' : No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
I tried that with python3 but it's the same.
I think it's like this problem:
Issue in installing pysqlcipher3
but I did not succeed to resolve the problem
Someone can help me please?

Install tlc (i'm use 8.6)
https://www.activestate.com/products/tcl/downloads/
(tclsh*.exe) is available in the PATH.(tclsh C:\Tcl\bin\tclsh.exe)
Install VISUAL STUDIO (add) and VISUAL STUDIO C++ Build
go to microsoft
Install OpenSSL x64 or x32 (i'm use x64)
https://slproweb.com/products/Win32OpenSSL.html
add to PATH
x64
OPENSSL_CONF C:\Program Files\OpenSSL-Win64\bin\openssl.cfg
x32
OPENSSL_CONF C:\Program Files(x86)\OpenSSL-Win32\bin\openssl.cfg
in folder
C:\Program Files\OpenSSL-Win64\lib
save copy
libcrypto.def and libcrypto.lib
and rename at
libeay32.def and libeay32.lib
save copy
libssl.def and libssl.lib
and rename at
ssleay32.def and ssleay32.lib
copy folder
C:\Program Files\OpenSSL-Win64\include\openssl
to
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include
Download sqlcipher
https://github.com/sqlcipher/sqlcipher
in root sqlcipher change Makefile.msc
this
TCC = $(TCC) -DSQLITE_TEMP_STORE=1
change to
TCC = $(TCC) -DSQLITE_TEMP_STORE=2 -DSQLITE_HAS_CODEC -I"C:\Program Files\OpenSSL-Win64\include"
next
# If ICU support is enabled, add the linker options for it.
#
!IF $(USE_ICU)!=0
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
LTLIBS = $(LTLIBS) $(LIBICU)
!ENDIF
# <</mark>>
# You should not have to change anything below this line
change to
# If ICU support is enabled, add the linker options for it.
#
!IF $(USE_ICU)!=0
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
LTLIBS = $(LTLIBS) $(LIBICU)
!ENDIF
# <</mark>>
LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:"C:\Program Files\OpenSSL-Win64\lib\VC\static"
LTLIBS = $(LTLIBS) libcrypto64MT.lib libssl64MT.lib ws2_32.lib shell32.lib advapi32.lib gdi32.lib user32.lib crypt32.lib
# You should not have to change anything below this line
x64 Native Tools Command (VS)
path\to\sqlcipher>
nmake /f Makefile.msc clean
nmake /f Makefile.msc
Download pysqlcipher3
https://github.com/rigglemania/pysqlcipher3
create folder
/amalgamation in /pysqlcipher3
COPY TWO FILES FROM /sqlcipher
sqlite3.c sqlite3.h
TO /pysqlcipher3/amalgamation
Download sqlite-amalgamation
https://sqlite.org/download.html
i'm use https://sqlite.org/2021/sqlite-amalgamation-3340100.zip
create folder
/pysqlcipher3/src/python3/sqlcipher
copy 4 files from sqlite-amalgamation-3340100.zip
shell.c sqlite3.c sqlite.h sqliteext.h
to
/pysqlcipher3/src/python3/sqlcipher
x64 Native Tools Command (VS)
path\to\pysqlcipher3>
setup.py clean
enter code here
setup.py build_amalgamation
setup.py install

Related

How do i resolve this ildoonet / tf-pose-estimation installing issue for windows 10

enter image description hereI was installing the packages on my conda environment in order to run the pose estimation according to the tutorial from https://www.youtube.com/watch?v=nUjGLjOmF7o&list=PLX-LrBk6h3wQ17z1axCOAS1QVS1dvTEvR and the github page https://github.com/ildoonet/tf-pose-estimation where u have to run the requirement.txt file to install the 3rd party packages for it to run in the end $ pip3 install -r requirements.txt.
I had 3 errors. the first was missing Cython package that I already found and installed. The 2nd was an error: Error Microsoft Visual C++ 14.0 is required that i resolved going here https://medium.com/#jacky_ttt/day060-fix-error-microsoft-visual-c-14-0-is-required-629413e798cd and installing the necessary packages in the visual studio c++ build tools. But i came across a new error that even i can solve. I would appreciate any help. The error came on my anaconda prompt:
Building wheels for collected packages: pycocotools, tensorpack
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\M S Tiwana\.conda\envs\tfposee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MSTIWA~1\AppData\Local\Temp\pip-wheel-fdystmqn'
cwd: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-install-vjk9vvy3\pycocotools\
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\pycocotools
creating build\temp.win-amd64-3.7\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Users\M S Tiwana\.conda\envs\tfposee\lib\site-packages\numpy\core\include" -Icommon "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.7\Release\pycocotools/_mask.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Building wheel for tensorpack (setup.py) ... done
Created wheel for tensorpack: filename=tensorpack-0.10-py2.py3-none-any.whl size=291265 sha256=85cc191f624cecba1af9d7bfeff01bd6fd592c8763010a1468abc0c6ccedfeac
Stored in directory: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-ephem-wheel-cache-cjd1_8p6\wheels\8f\c4\7d\b7ca213c76a0b78c772c6d3173364b8102d262acda1ec45207
Successfully built tensorpack
Failed to build pycocotools
Installing collected packages: pycocotools, slidingwindow, tabulate, msgpack, msgpack-numpy, tensorpack
Running setup.py install for pycocotools ... error
Is there a visual studio c++ build tool install error ?
pycocotools is for linux, since you're using windows 10
instead of using: pip install pycocotools
use this: pip install pycocotools-windows
https://pypi.org/project/pycocotools-windows/

Trouble installing pycairo any suggestions on what to try next?

I have been trying to install pycairo for three days and I was wondering wether anyone could reproduce the error or if I am slowly starting to turn mad. I am glad for any help or suggestions.
What I have tried:
I looked at the answers from Installation of PyCairo on Windows and How do you install PyCairo (Cairo for Python) on Windows?.
I tried installing pycairo using a file downloaded from Python Extension Packages for Windows but it says
ERROR: pycairo-1.19.1-cp38-cp38-win32.whl is not a supported wheel on this platform.
I used the following command pip install "C:\Users\...\Downloads\pycairo-1.19.1-cp38-cp38-win32.whl"
I tried installing pycairo via pip pip install pycairo which gives me a really long error message:
Collecting pycairo
Using cached pycairo-1.19.1.tar.gz (205 kB)
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\caspa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\caspa\AppData\Local\Temp\pip-record-pbvjvlu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\caspa\appdata\local\programs\python\python37-32\Include\pycairo'
cwd: C:\Users\caspa\AppData\Local\Temp\pip-install-tjiuwot4\pycairo\
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cairo
copying cairo\__init__.py -> build\lib.win32-3.7\cairo
copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
copying cairo\py.typed -> build\lib.win32-3.7\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -Ic:\users\caspa\appdata\local\programs\python\python37-32\include -Ic:\users\caspa\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win32-3.7\Release\cairo/device.obj
device.c
C:\Users\caspa\AppData\Local\Temp\pip-install-tjiuwot4\pycairo\cairo\pycairo.h(37): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "cairo.h": No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.24.28314\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\caspa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\caspa\\AppData\\Local\\Temp\\pip-install-tjiuwot4\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\caspa\AppData\Local\Temp\pip-record-pbvjvlu1\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\caspa\appdata\local\programs\python\python37-32\Include\pycairo' Check the logs for full command output.
I get the same error message when trying to install PyGoject which contains pycairo via pip.
I found something that should be supposed to fix the error, but unfortunatly the Link in the forum is dead. I went to the official download page (I belive) cairographics.org and its a dead link as well.
EDIT: I forgot to mention another thing I tried, I went to the Cairo Docs on getting started, but it's unfortunatly only for Ubuntu/Linux/IOS.
I've ran into a similar error to this as well, so here's what worked for me. Go to https://pycairo.readthedocs.io/en/latest/getting_started.html for more info. You'll have to run one of these five commands to set up pkg-config on your computer prior to running the install command.
Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
macOS/Homebrew: brew install cairo pkg-config
Arch Linux: sudo pacman -S cairo pkgconf
Fedora: sudo dnf install cairo-devel pkg-config python3-devel
penSUSE: sudo zypper install cairo-devel pkg-config python3-devel
Then run:
import cairo
Hope that works!
I'm new with Python so I'm not really sure what's going on but this works for me.
Simply change the "pip" to "pip3" and it'll magically work.
As of this writing, I'm using Python 3.8 64-bit so my command is this:
pip3 install pycairo-1.19.1-cp38-cp38-win_amd64.whl
From what I understand, this seems to be an incompatibility since Python 2 life has ended and lost support just early this year. So pretty much all the tutorial is outdated and didn't work.

pip acts weirdly since few days

With my Anaconda python27 install on Windows 64 bit, pip doesn't work anymore..
First of all, I tried to upgrade it, but it was up to date :
C:\Users\Administrateur>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\program files\anaconda\lib\site-packages
I also tried to upgrade setuptools, it wasn't updated but it doesn't helped.
I recently tried to install few modules and it end each time with an error. For example, If I want to install pyx I get the following error message :
No files/directories in
c:\users\...\appdata\local\temp\pip-build-soh1bb\pyx\pip-egg-info (from PKG-INFO)
If I open a windows in my temp folder, I see that the files are collected then deleted just after. Also, this is not the same folder that the one cited in error.
If I try to install fiona, the error is different :
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files\Anaconda\include" "-IC:\Program
Files\Anaconda\PC" /Tpfiona/_transform.cpp /Fobuild\temp.win-amd64-
2.7\Release\fiona/_transform.obj
_transform.cpp
fiona/_transform.cpp(564) :
fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'cpl_conv.h'ÿ:
No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft
Visual Studio 9.0\\VC\\Bin\\cl.exe' failed with exit status 2
Failed building wheel for fiona
Failed to build fiona
And finally :
Command ""C:\Program Files\Anaconda\python.exe" -u -c "import setuptools, tokenize;__file__='c:\\users\\...\\appdata\\local\\temp\\pip-build-h2ns8z\\f iona\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record c:\users\...\appdata\local\temp\pip-fme6kj-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in
c:\users\...\appdata\local\temp\pip-build-h2ns8z\fiona\
I never had this problem before and pip is updated correctly, last module I installed is pygame could it be related ?
Looks like you install is missing libgdal package. Install it first.
Download Gdal Binaries

I can't install kivy on windows 10 with py3.5

I can't install kivy on windows 10. What can i do? Here are errors.
C:\WINDOWS\system32>python -m pip install kivy
Collecting kivy
Using cached kivy-1.9.1.tar.gz
Requirement already satisfied: Kivy-Garden>=0.1.4 in c:\users\kenan\appdata\local\programs\python\python35-32\lib\site-packages (from kivy)
Requirement already satisfied: requests in c:\users\kenan\appdata\local\programs\python\python35-32\lib\site-packages (from Kivy-Garden>=0.1.4->kivy)
Building wheels for collected packages: kivy
Running setup.py bdist_wheel for kivy ... error
Complete output from command C:\Users\kenan\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\kenan\\AppData\\Local\\Temp\\pip-build-9ojxbuh8\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\kenan\AppData\Local\Temp\tmp86qekmsbpip-wheel- --python-tag cp35:
Using distutils
Detected Cython version 0.23
User distribution detected, avoid portable command.
Windows platform detected, force GLEW usage.
Using this graphics system: OpenGL
WARNING: A problem occured while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
WARNING: A problem occured while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
Build configuration is:
* use_rpi = 0
* use_mali = 0
* use_egl = 0
* use_opengl_es2 = 0
* use_opengl_debug = 0
* use_glew = 1
* use_sdl2 = 0
* use_ios = 0
* use_mesagl = 0
* use_x11 = 0
* use_gstreamer = 0
* use_avfoundation = 0
* use_osx_frameworks = 0
* debug_gl = 0
* debug = False
Detected compiler is msvc
C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\winrt" /TcC:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vertex_instructions.c /Fobuild\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vertex_instructions.obj
vertex_instructions.c
c:\users\kenan\appdata\local\temp\pip-build-9ojxbuh8\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for kivy
Running setup.py clean for kivy
Failed to build kivy
Installing collected packages: kivy
Running setup.py install for kivy ... error
Complete output from command C:\Users\kenan\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\kenan\\AppData\\Local\\Temp\\pip-build-9ojxbuh8\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\kenan\AppData\Local\Temp\pip-9ucs7wug-record\install-record.txt --single-version-externally-managed --compile:
Using distutils
Detected Cython version 0.23
User distribution detected, avoid portable command.
Windows platform detected, force GLEW usage.
Using this graphics system: OpenGL
WARNING: A problem occured while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
WARNING: A problem occured while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
b"'pkg-config' is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
Build configuration is:
* use_rpi = 0
* use_mali = 0
* use_egl = 0
* use_opengl_es2 = 0
* use_opengl_debug = 0
* use_glew = 1
* use_sdl2 = 0
* use_ios = 0
* use_mesagl = 0
* use_x11 = 0
* use_gstreamer = 0
* use_avfoundation = 0
* use_osx_frameworks = 0
* debug_gl = 0
* debug = False
Detected compiler is msvc
cythoning C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics/vbo.pyx to C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.c
building 'kivy.graphics.vbo' extension
creating build\temp.win32-3.5
creating build\temp.win32-3.5\Release
creating build\temp.win32-3.5\Release\Users
creating build\temp.win32-3.5\Release\Users\kenan
creating build\temp.win32-3.5\Release\Users\kenan\AppData
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy
creating build\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics
C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include -IC:\Users\kenan\AppData\Local\Programs\Python\Python35-32\include "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\winrt" /TcC:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.c /Fobuild\temp.win32-3.5\Release\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\kivy\graphics\vbo.obj
vbo.c
c:\users\kenan\appdata\local\temp\pip-build-9ojxbuh8\kivy\kivy\graphics\gl_redirect.h(8): fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Command "C:\Users\kenan\AppData\Local\Programs\Python\Python35-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\kenan\\AppData\\Local\\Temp\\pip-build-9ojxbuh8\\kivy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\kenan\AppData\Local\Temp\pip-9ucs7wug-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\kenan\AppData\Local\Temp\pip-build-9ojxbuh8\kivy\*
Kivy now has 3.4, 3.5, 3.6 wheels, no compilation necessary. See installation documentation. The error is because you were trying to install Kivy from pip, where is only the stable version now (1.9.1), which is a little bit old and the code doesn't support py3.5 and higher in that state.
MSVC needs a little bit of tweaking and patches. The whole instructions are in pull requests, but those are still experimental only and there's a need to fix a pointer mismatch (another pull request).
Otherwise Kivy (at least for py3.4 and lower) uses gcc. How to compile is written here
However, for casual usage you don't need to compile, because there are wheels. If you read the docs properly, you'll find out how to install it.
If you encounter Window error, search here, there are already answered questions.
There are even unofficial wheels for py3.5 somewhere.
Install PIP
Upgrade PIP
Install Microsoft CPP BUILD TOOLS. Google it, you can find it easily if this link is broken.
Download Kivy Package from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame You might face
issues of "Wheel package is not supported". Just look for the
package with win32 with/without AMD. Still, if you keep getting the
same error, Just try downloading the different package and follow
the following steps. Took me to download 3 Packages to get it right.
Open CMD
Change Directory to Downloads (Or wherever the package is
downloaded)
Do pip install completePackageName.whl
Ex: C:\Users\UserName\Downloads>pip install
Kivy-1.9.1+sdl2-cp35-cp35m-win32.whl
Hi im using py38 and win10 too,
check this https://github.com/kivy/kivy/issues/6563
Anyone recommend run this command, (it works for me)
pip install kivy[base] kivy_examples --pre --extra-index-url https://kivy.org/downloads/simple/
or try with https://www.lfd.uci.edu/~gohlke/pythonlibs/#kivy

GMPY2 Not installing, mpir.h not found

I am trying to install gmpy2 on my Anaconda Python 3.5 distribution using pip. I was able to install other modules such as primefac perfectly. When I try to install gmpy2 this is what I get:
(C:\Program Files\Anaconda3) C:\WINDOWS\system32>pip install gmpy2
Collecting gmpy2
Using cached gmpy2-2.0.8.zip
Building wheels for collected packages: gmpy2
Running setup.py bdist_wheel for gmpy2 ... error
Complete output from command "C:\Program Files\Anaconda3\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\HADIKH~1\\AppData\\Local\\Temp\\pip-build-hd7b270n\\gmpy2\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\HADIKH~1\AppData\Local\Temp\tmplefsjn80pip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_ext
building 'gmpy2' extension
creating build
creating build\temp.win-amd64-3.5
creating build\temp.win-amd64-3.5\Release
creating build\temp.win-amd64-3.5\Release\src
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DMPIR -DWITHMPFR -DWITHMPC "-IC:\Program Files\Anaconda3\include" "-IC:\Program Files\Anaconda3\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\\winrt" /Tcsrc\gmpy2.c /Fobuild\temp.win-amd64-3.5\Release\src\gmpy2.obj
gmpy2.c
c:\users\hadi khan\appdata\local\temp\pip-build-hd7b270n\gmpy2\src\gmpy.h(104): fatal error C1083: Cannot open include file: 'mpir.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for gmpy2
I have noticed that whenever I try installing gmpy2 on a computer I always get some sort of error and it is a different one every time. Can someone please tell me how to fix this.
Thanks.
The reason is some required packages (especially below packages) aren't installed.
GMP: GNU Multiple Precision Arithmetic Library
MPFR: GNU Multiple-precision floating-point rounding library
MPC: GNU Multiple-precision C library
you could install those packages by below commands:
apt-get install libgmp-dev
apt-get install libmpfr-dev
apt-get install libmpc-dev
I could install gmpy2 by installing those libraries.
the key point is remembering below hint when you got an error like above.
# include "***.h": ==> No such file or directory
apt-get install lib"***"-dev
I maintain gmpy2 and unfortunately I have not been able to build Windows binaries for Python 3.5 and later. gmpy2 relies on either the MPIR or GMP libraries, and the MPFR and MPC libraries. There are detailed instructions included in the source distribution but they are not trivial to build on Windows. It is probably impossible(*) to build MPIR, MPFR, and MPC via pip. I would use the pre-compiled binaries available from http://www.lfd.uci.edu/~gohlke/pythonlibs/
(*) I'm sure it is possible with enough effort but I haven't done it.
The answer above works as noted, but i had to also find out how to install a wheel, which is answered here How do I install a Python package with a .whl file?
specifically, by copying the wheel file and executing (in my case), using pip 9
pip install C:\Python35\gmpy2-2.0.8-cp35-cp35m-win32.whl
Use conda to install instead of pip. conda will take care of installing the necessary dependencies. The command is: conda install gmpy2

Categories