Fail downloading cx_Freeze - python

I am getting this error trying to download cx_Freeze.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\BregmanM\Downloads\cx_Freeze-5.0.2>python setup.py install
running install
running bdist_egg
running egg_info
writing cx_Freeze.egg-info\PKG-INFO
writing dependency_links to cx_Freeze.egg-info\dependency_links.txt
writing top-level names to cx_Freeze.egg-info\top_level.txt
reading manifest file 'cx_Freeze.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.txt'
writing manifest file 'cx_Freeze.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'cx_Freeze.util' extension
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\BregmanM\AppData\Local\Pro
grams\Python\Python36-32\include -IC:\Users\BregmanM\AppData\Local\Programs\Pyth
on\Python36-32\include /Tcsource/util.c /Fobuild\temp.win32-3.6\Release\source/u
til.obj
error: command 'cl.exe' failed: No such file or directory
But the problem here is I tied to fix the PATH issue and that did not work for me (python pip on Windows - command 'cl.exe' failed). I also must note, that I cannot just download using pip install because I am on a work computer that blocks me from doing so. My only option is to download the whl or tar.gz file. How can I go about fixing this? I am running on Python 3.6 so using py2exe will not work.
When I tried adding to PATH this is what I get:
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\BregmanM\AppData\Local\Programs\Python\Python36-32\include -IC:\Users\BregmanM\AppData\Local\Programs\Python\Python36-32\include /Tcsource/util.c /Fobuild\temp.win32-3.6\Release\source/util.obj
error: command 'cl.exe' failed: No such file or directory
Here is what my directory looks like:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe
I also have another 6 folders than contain cl.exe, but I'm assuming they are different. I even tried adding those to PATH but I get more errors.

Related

Install pycocotools error "LINK : fatal error LNK1181: cannot open input file "C:\Program.obj""

I'm trying to train tensorflow model using this tutorial https://towardsdatascience.com/creating-your-own-object-detector-ad69dda69c85 but when I'm trying to install pycocotools I get following error:
running build
running build_py
running build_ext
building 'pycocotools._mask' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.1
6.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\Ja
\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\core\include -I.
./common -IC:\Users\Ja\AppData\Local\Programs\Python\Python37\include -IC:\Users
\Ja\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Mic
rosoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-
IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.
16.27023\include" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.7\Release\pyc
ocotools/_mask.obj
_mask.c
c:\users\ja\appdata\local\programs\python\python37\include\pyconfig.h(59): fatal
error C1083: Cannot open file include: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Communit
y\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit sta
tus 2
I've tried installing Visual Studio 2017 packages suggested in this thread https://stackoverflow.com/questions/40018405/cannot-open-include-file-io-h-no-such-file-or-directory
but this still doesn't work. Any ideas what is wrong?
Pycocotools from https://github.com/philferriere/cocoapi
Windows 8.1
Python 3.7
Visual Studio 2017

Unable to build talib 64 bit

I am trying to build talib for 64 bit Python. I have a 64 bit Python installation (Using Anaconda 64 bit distribution). I installed Microsoft SDK and set the environment to x64 using the following command
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
but still no success. I have been struggling with this for past 2 days. Please help.
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1
\.
Targeting Windows 7 x64 Debug
C:\ABC\Python\pkgs\ta-lib\ta-lib-TA_Lib-0.4.7\ta-lib-TA_Lib-0.4.7>C:\Anaconda64\
python.exe setup.py build --compiler msvc
running build
running build_py
running build_ext
skipping 'talib\common.c' Cython extension (up-to-date)
building 'talib.common' extension
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64\cl.exe /c /nolo
go /Ox /MD /W3 /GS- /DNDEBUG -IC:\Anaconda64\lib\site-packages\numpy\core\includ
e -Ic:\ta-lib\c\include -IC:\Anaconda64\include -IC:\Anaconda64\PC /Tctalib\comm
on.c /Fobuild\temp.win-amd64-2.7\Release\talib\common.obj
common.c
C:\Anaconda64\include\pyconfig.h(68) : fatal error C1083: Cannot open include fi
le: 'io.h': No such file or directory
error: command 'cl.exe' failed with exit status 2
C:\ABC\Python\pkgs\ta-lib\ta-lib-TA_Lib-0.4.7\ta-lib-TA_Lib-0.4.7>
Download TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib.
And use command
pip install TA_Lib-0.4.10-cp27-cp27m-win_amd64.whl

Build Python package with C bindings in Windows (VC90) causes LNK1181 fatal error

I'm trying to build a Python package (pyspotify) with bindings to a C library (libspotify).
I'm using Python 2.7.5 and have installed VS2008 Express for some required commandline tools.
When I call python setup.py build from the Command Prompt (with Admin rights) I get the following output:
running build
running build_py
running build_ext
building 'spotify._spotify' extension
And then ~18 of these, one for each .c file in the package:
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GS- /DNDEBUG -Isrc -Ic:\Python\Python27\include -Ic:\Python\Python27\PC
/Tcsrc\module.c /Fobuild\temp.win32-2.7\Release\src\module.obj
module.c
And then the showstopper:
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO /LIBPATH:c:\Python\Python27\libs /LIBPATH:c:\Python\Python27\PCb
uild spotify.lib /EXPORT:init_spotify build\temp.win32-2.7\Release\src\module.ob
j build\temp.win32-2.7\Release\src\session.obj build\temp.win32-2.7\Release\src\
link.obj build\temp.win32-2.7\Release\src\track.obj build\temp.win32-2.7\Release
\src\album.obj build\temp.win32-2.7\Release\src\albumbrowser.obj build\temp.win3
2-2.7\Release\src\artist.obj build\temp.win32-2.7\Release\src\artistbrowser.obj
build\temp.win32-2.7\Release\src\search.obj build\temp.win32-2.7\Release\src\pla
ylist.obj build\temp.win32-2.7\Release\src\playlistcontainer.obj build\temp.win3
2-2.7\Release\src\playlistfolder.obj build\temp.win32-2.7\Release\src\image.obj
build\temp.win32-2.7\Release\src\user.obj build\temp.win32-2.7\Release\src\pyspo
tify.obj build\temp.win32-2.7\Release\src\toplistbrowser.obj /OUT:build\lib.win3
2-2.7\spotify\_spotify.pyd /IMPLIB:build\temp.win32-2.7\Release\src\_spotify.lib
/MANIFESTFILE:build\temp.win32-2.7\Release\src\_spotify.pyd.manifest
LINK : fatal error LNK1181: cannot open input file 'spotify.lib'
error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.
exe"' failed with exit status 1181
And I have tried to search for this LNK1181 error, but all answers seems to be about remembering quotes around string, or some settings in VS which I in this case has no control over.
You need to download the appropriate version of libspotify from here unzip it and put it in the same directory that you are trying to build in, (easiest place), or tell VS where to find it.

Exception while installing packages in Python

I am Getting this Exception while installing packages in Python.
uninstalled python and installed it again but there is no
C:\Users\ramasastri.g\Desktop\pycrypto-2.6>python setup.py install
running install
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -Isrc/inc-msvc/ -IC:\Python27\include -IC:\Python27\PC /Tcsrc/winrand.c /Fobuild\temp.win32-2.7\Release\src/winrand.obj
winrand.c
c:\python27\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2
Probably you are missing the c++ compiler.
I installed it using a pre-packaged version from here
My problem was inside a virtualenv. I could not install some packages and got the same fatal error c1083. I was trying Visual Studio and PTVS. Just installing Microsoft Visual C++ Compiler for Python 2.7 https://www.microsoft.com/en-us/download/details.aspx?id=44266 was not enough to fix the error, despite it is needed.
I have found the solution here http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/
The setuptools installed by virtualenv is too old (3.6). You need to remove it and reinstalling but, in the "Install python package" window in Visual Studio solution explorer, instead of using "setuptools" as the module name to install use "setuptools>=6.0".
Got the same error message and found the cause was that while I had set up the PATH variable correctly with the paths to Visual Studio and Python, I forgot to add the C:\Windows\System32 path.

Error in installing pymssql 1.0.2 on Windows 2003 x64

I am trying to install the latest version of pymssql (1.0.2) in my Windows 2003 x64.
However, I am constantly getting this error:
running install
running build
running build_py
running build_ext
building '_mssql' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\Program Files\Microsoft SQL Server\80\Tool
s\DevTools\Include" -Ic:\mssql7\DevTools\Include -Id:\DEVEL\pymssql-DEVTOOLS\INCLUDE -Ic:\Python27\include -Ic:\Python27\PC /Tcmssqldbmodule.c /Fobuil
d\temp.win32-2.7\Release\mssqldbmodule.obj
mssqldbmodule.c
mssqldbmodule.c(50) : fatal error C1083: Cannot open include file: 'sqlfront.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
Any ideas? Isn't sqlfront.h included in the installation of visual studio 2k8 (or any visual studios)
Thank you!
I had the same problem with Visual Studio 2008, Windows 7 64 and Python 2.7 (32 bits).
These were the steps I followed to solved it:
Install Visual Studio 2008 (32 bits).
Install Visual Studio 6.
Install Python 2.7 (32 bits)
Download pymssql (the same package you downloaded)
Try to compile the source code (the same you did when you got the error, you will get it again).
At the same directory where setup.py is, you should find a file named mssqldbmodule.c, open it.
Change the lines #include <sqlfront.h> and #include <sqldb.h> To #include "sqlfront.h" and #include "sqldb.h" So the compiler will look for sqlfront.h and sqldb.h files locally.
Copy the files sqlfront.h and sqldb.h from: C:\Program Files (x86)\Microsoft Visual Studio\VC98\Include (Visual Studio 6 installation) To you local directory (where setup.py is).
Copy the file NTWDBLIB.LIB from C:\Program Files (x86)\Microsoft Visual Studio\VC98\Lib
To your local directory.
Run again setup.py install
This way you will compile the library using the deprecated NTWDBLIB which is the one used by pymssql.
The directory <pymssql root>\freetds\vs2008_32\ (or <pymssql root>\freetds\vs2008_64\ if you use 64bits python) has not been set for header files and libs yet I think.
About freetds, please check the "Building FreeTDS" part of README_building_and_developing.rst.

Categories