pygraphviz installation failed when building 'pygraphviz._graphviz' extension - python

I'm trying to install pygraphviz on Win7, python 3.5
Using following command:
C:\Users\...>C:\Python35\python.exe -m pip install pygraphviz
Also tried to add install options, but it didn't help:
--install-option="--library-path=C:\Program Files (x86)\Graphviz\graphviz-2.38\release\lib\debug\lib" --install-option="--include-path=C:\Program Files (x86)\Graphviz\graphviz-2.38\release\include"
And here is the return:
no previously-included directories found matching 'doc\build'
writing manifest file 'pygraphviz.egg-info\SOURCES.txt'
copying pygraphviz\graphviz.i -> build\lib.win-amd64-3.5\pygraphviz
copying pygraphviz\graphviz_wrap.c -> build\lib.win-amd64-3.5\pygraphviz
running build_ext
building 'pygraphviz._graphviz' extension
error: [WinError 2] The system cannot find the file specified
----------------------------------------
Command "C:\Python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\
\Users\\ebarhab\\AppData\\Local\\Temp\\pip-build-iot7onp2\\pygraphviz\\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\ebar
hab\AppData\Local\Temp\pip-hrnu16e0-record\install-record.txt --single-version-e
xternally-managed --compile "--library-path=C:\Program Files (x86)\Graphviz\grap
hviz-2.38\release\lib\debug\lib" "--include-path=C:\Program Files (x86)\Graphviz
\graphviz-2.38\release\include"" failed with error code 1 in C:\Users\ebarhab\Ap
pData\Local\Temp\pip-build-iot7onp2\pygraphviz\
Could you help me solve this issue?
Thanks,
Bartek

Related

Python can't install Box2D swig.exe failed with error code 1

I try to install Box2D on python but I get the error log:
C:\>pip3 install Box2D
Collecting Box2D
Using cached https://files.pythonhosted.org/packages/cc/7b/ddb96fea1fa5b24f8929714ef483f64c33e9649e7aae066e5f5023ea426a/Box2D-2.3.2.tar.gz
Building wheels for collected packages: Box2D
Running setup.py bdist_wheel for Box2D ... error
Complete output from command c:\users\hp-laptop\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\HP-LAP~1\\AppData\\Local\\Temp\\pip-install-r48_7g5v\\Box2D\\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\HP-LAP~1\AppData\Local\Temp\pip-wheel-d2ghuwrx --python-tag cp36:
Using setuptools (version 40.5.0).
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\Box2D
copying library\Box2D\Box2D.py -> build\lib.win-amd64-3.6\Box2D
copying library\Box2D\__init__.py -> build\lib.win-amd64-3.6\Box2D
creating build\lib.win-amd64-3.6\Box2D\b2
copying library\Box2D\b2\__init__.py -> build\lib.win-amd64-3.6\Box2D\b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
C:\Users\HP-Laptop\AppData\Local\Programs\Python\Python36\swig.exe -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library\Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp Box2D\Box2D.i
C:\Users\HP-Laptop\AppData\Local\Programs\Python\Python36\Lib\pyprimtypes.swg(7) : Error: Syntax error in input(1).
error: command 'C:\\Users\\HP-Laptop\\AppData\\Local\\Programs\\Python\\Python36\\swig.exe' failed with exit status 1
----------------------------------------
Failed building wheel for Box2D
Running setup.py clean for Box2D
Failed to build Box2D
Installing collected packages: Box2D
Running setup.py install for Box2D ... error
Complete output from command c:\users\hp-laptop\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\HP-LAP~1\\AppData\\Local\\Temp\\pip-install-r48_7g5v\\Box2D\\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\HP-LAP~1\AppData\Local\Temp\pip-record-nv5dm4ru\install-record.txt --single-version-externally-managed --compile:
Using setuptools (version 40.5.0).
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\Box2D
copying library\Box2D\Box2D.py -> build\lib.win-amd64-3.6\Box2D
copying library\Box2D\__init__.py -> build\lib.win-amd64-3.6\Box2D
creating build\lib.win-amd64-3.6\Box2D\b2
copying library\Box2D\b2\__init__.py -> build\lib.win-amd64-3.6\Box2D\b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
C:\Users\HP-Laptop\AppData\Local\Programs\Python\Python36\swig.exe -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library\Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp Box2D\Box2D.i
C:\Users\HP-Laptop\AppData\Local\Programs\Python\Python36\Lib\pyprimtypes.swg(7) : Error: Syntax error in input(1).
error: command 'C:\\Users\\HP-Laptop\\AppData\\Local\\Programs\\Python\\Python36\\swig.exe' failed with exit status 1
----------------------------------------
Command "c:\users\hp-laptop\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\HP-LAP~1\\AppData\\Local\\Temp\\pip-install-r48_7g5v\\Box2D\\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\HP-LAP~1\AppData\Local\Temp\pip-record-nv5dm4ru\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\HP-LAP~1\AppData\Local\Temp\pip-install-r48_7g5v\Box2D\
I tried all solutions for windows from Installing pocketsphinx python module: command 'swig.exe' failed without result.
How can I install Box2D and what means error code 1 by swig ?
I got the same error for Box2D, but solved as follows.
I am using Anaconda environment with python3.6.
try these.
conda install swig
pip install box2d
download swig here : http://www.swig.org/download.html
Extract the archive somewhere, add the path of the extracted directory to your PATH environment variable.
Restart your cmd console window (close it and reopen it), do your pip install Box2D
I need to say that when on the anaconda environment, just add path, it also doesn't work. we need to go on the Scripts with pip.exe. And run the command!
I got same error for Box2D.
My Solution-
downloading Microsoft Visual C++ Compiler for Python 2.7 from http://aka.ms/vcpython27
Complete the installation.
Then on anaconda prompt
type command 'pip install Box2D'
Then type 'pip install gym[all]'
This will install the remaining dependencies.
Hope this helps you.
Hello there I must be late but I hope this helps someone to solve his problem.
Just use any package manager like choco or conda or any other package manager to install the swig package to your machine then run the command to install box2d again.
choco install swig
pip install box2d-py
Whoever is on Windows and facing this issue. Try installing C++ tools on windows through https://visualstudio.microsoft.com/visual-cpp-build-tools/.
Then Install C++ tools through visual studio. This should solve your problem
Try Install Box2D after this (make sure Swig is installed)

I encountered an error when trying to install mod_wsgi apache module

I'm using Bitnami WAPP (Windows, Apache, PostgreSQL, PHP) Stack as a development environment and I need to install mod_wsgi in order to use pgAdmin4 - an RDBMS for PostgreSQL (similar to MySQL Workbench). But when I tried to install it using pip install mod_wsgi it returns the following error:
C:\WINDOWS\system32>pip install mod_wsgi
Collecting mod_wsgi
Using cached https://files.pythonhosted.org/packages/47/69/5139588686eb40053f8355eba1fe18a8bee94dc3efc4e36720c73e07471a/mod_wsgi-4.6.5.tar.gz
Installing collected packages: mod-wsgi
Running setup.py install for mod-wsgi ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\justin~1\appdata\local\temp\pip-install-myppun\mod-wsgi\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\justin~1\appdata\local\temp\pip-record-xtudvn\install-record.txt --single-version-externally-managed --compile:
c:\python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\mod_wsgi
copying src__init__.py -> build\lib.win-amd64-2.7\mod_wsgi
creating build\lib.win-amd64-2.7\mod_wsgi\server
copying src\server\apxs_config.py -> build\lib.win-amd64-2.7\mod_wsgi\server
copying src\server\environ.py -> build\lib.win-amd64-2.7\mod_wsgi\server
copying src\server__init__.py -> build\lib.win-amd64-2.7\mod_wsgi\server
creating build\lib.win-amd64-2.7\mod_wsgi\server\management
copying src\server\management__init__.py -> build\lib.win-amd64-2.7\mod_wsgi\server\management
creating build\lib.win-amd64-2.7\mod_wsgi\server\management\commands
copying src\server\management\commands\runmodwsgi.py -> build\lib.win-amd64-2.7\mod_wsgi\server\management\commands
copying src\server\management\commands__init__.py -> build\lib.win-amd64-2.7\mod_wsgi\server\management\commands
creating build\lib.win-amd64-2.7\mod_wsgi\docs
copying docs_build\html__init__.py -> build\lib.win-amd64-2.7\mod_wsgi\docs
creating build\lib.win-amd64-2.7\mod_wsgi\images
copying images__init__.py -> build\lib.win-amd64-2.7\mod_wsgi\images
copying images\snake-whiskey.jpg -> build\lib.win-amd64-2.7\mod_wsgi\images
running build_ext
building 'mod_wsgi.server.mod_wsgi' extension
error: INCLUDE environment variable is empty
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;file='c:\users\justin~1\appdata\local\temp\pip-install-myppun\mod-wsgi\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\justin~1\appdata\local\temp\pip-record-xtudvn\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\justin~1\appdata\local\temp\pip-install-myppun\mod-wsgi\
I've also run this command before the above command
set "MOD_WSGI_APACHE_ROOTDIR=C:/Bitnami/wappstack-7.1.25-0/apache2"
How can I fix it? Please help... Thank you!

Error installing Pillow (Django)

I'm having trouble getting Pillow to install.
Here's the full traceback:
Collecting Pillow
Using cached Pillow-4.0.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting olefile (from Pillow)
Using cached olefile-0.44.zip
Installing collected packages: olefile, Pillow
Running setup.py install for olefile ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-QHsEXV-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying OleFileIO_PL.py -> build/lib
creating build/lib/olefile
copying olefile/__init__.py -> build/lib/olefile
copying olefile/olefile.py -> build/lib/olefile
copying olefile/README.rst -> build/lib/olefile
copying olefile/README.html -> build/lib/olefile
copying olefile/LICENSE.txt -> build/lib/olefile
copying olefile/CONTRIBUTORS.txt -> build/lib/olefile
running install_lib
creating /Library/Python/2.7/site-packages/olefile
error: could not create '/Library/Python/2.7/site-packages/olefile': Permission denied
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-QHsEXV-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/bt/_3d4816x12d95tzvcp_0302w0000gn/T/pip-build-UyBMYN/olefile/
The error seems to be 'Permission denied' when attempting to create the folder; though I cannot understand why...
My machine is running Mac OSX, and I'm using Terminal to run the commands for this Django project.
Because the normal user doesn't have permission to install packages globally. Either run with sudo, or - much better - use a virtualenv and install your packages in there.
There're several questions regarding this problem, I'd suggest to take a look at these:
Using virtualenv https://stackoverflow.com/a/19472082/394647
Using $HOMEhttps://stackoverflow.com/a/7143496/394647
I prefer the second one but it also depends on your project/app structure

Failed with pip install chompack

I'm trying to install chompack with pip to use in a Support Vector Machine algorithm with cvxopt. However it gives me an error for which I haven't found a clear answer. There is a related question but the answer provided is very specific to the package the person is trying to install. In my case, there's no binary package that I can download or even a .whl file.
The specific error seems to be
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
Here's what I typed in the command prompt (Windows 10 PC) and the full result.
pip install chompack
I get
Collecting chompack
Using cached chompack-2.2.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): cvxopt>=1.1.7 in c:\python27\lib\site-packages (from chompack)
Building wheels for collected packages: chompack
Running setup.py bdist_wheel for chompack ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d c:\users\my_username\appdata\local\temp\tmpv64_u4pip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --python-tag not recognized
----------------------------------------
Failed building wheel for chompack
Running setup.py clean for chompack
Failed to build chompack
Installing collected packages: chompack
Running setup.py install for chompack ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\my_username\appdata\local\temp\pip-fkqebc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\chompack
copying src\python\base.py -> build\lib.win32-2.7\chompack
copying src\python\conversion.py -> build\lib.win32-2.7\chompack
copying src\python\maxchord.py -> build\lib.win32-2.7\chompack
copying src\python\mcs.py -> build\lib.win32-2.7\chompack
copying src\python\misc.py -> build\lib.win32-2.7\chompack
copying src\python\pfcholesky.py -> build\lib.win32-2.7\chompack
copying src\python\symbolic.py -> build\lib.win32-2.7\chompack
copying src\python\__init__.py -> build\lib.win32-2.7\chompack
creating build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\cholesky.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\completion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\edmcompletion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\hessian.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\llt.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\plot.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\projected_inverse.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\psdcompletion.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\trmm.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\trsm.py -> build\lib.win32-2.7\chompack\pybase
copying src\python\pybase\__init__.py -> build\lib.win32-2.7\chompack\pybase
running build_ext
building 'cbase' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\src
creating build\temp.win32-2.7\Release\src\C
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tcsrc/C\cbase.c /Fobuild\temp.win32-2.7\Release\src/C\cbase.obj
cbase.c
c:\users\my_username\appdata\local\temp\pip-build-o8y8d4\chompack\src\c\cvxopt.h(31) : fatal error C1083: Cannot open include file: 'complex.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
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\my_username\\appdata\\local\\temp\\pip-build-o8y8d4\\chompack\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\my_username\appdata\local\temp\pip-fkqebc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\my_username\appdata\local\temp\pip-build-o8y8d4\chompack
I do not know the precise reason but you should use python itself to install packages as chompack:
python -m pip install chompack
For further informations read the manual: https://docs.python.org/3/installing/
PS: I have seen the same message but it installed it anyway.

Pocketsphinx-python installation error on Windows

I have been trying to install pocketsphinx on my laptop. I have installed all the dependencies, still keep giving the below error. GCC.exe exits in a folder and is added to the environment variables. Appreciate all the help
Source in c:\users\archana\appdata\local\temp\pip_build_archana\pocketsphinx has version 0.0.4, which satisfies requirement pocketsphinx
Installing collected packages: pocketsphinx
Running setup.py install for pocketsphinx
Running command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\archana\\appdata\\local\\temp\\pip_build_ARCHANA\\pocketsphinx\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\archana\\appdata\\local\\temp\\pip_build_ARCHANA\\pocketsphinx\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-2.7
creating build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\sphinxbase.py -> build\lib.win-amd64-2.7\sphinxbase
copying sphinxbase\swig\python\__init__.py -> build\lib.win-amd64-2.7\sphinxbase
creating build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\pocketsphinx.py -> build\lib.win-amd64-2.7\pocketsphinx
copying pocketsphinx\swig\python\__init__.py -> build\lib.win-amd64-2.7\pocketsphinx
running build_ext
building 'sphinxbase._sphinxbase' extension
swigging sphinxbase/swig/sphinxbase.i to sphinxbase/swig/sphinxbase_wrap.c
C:\Users\ARCHANA\Anaconda\swigwin-3.0.5\swig.exe -python -modern -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -outdir sphinxbase/swig/python -o sphinxbase/swig/sphinxbase_wrap.c sphinxbase/swig/sphinxbase.i
creating build\temp.win-amd64-2.7
creating build\temp.win-amd64-2.7\Release
creating build\temp.win-amd64-2.7\Release\sphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\feat
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\util
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\fe
creating build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxad
creating build\temp.win-amd64-2.7\Release\sphinxbase\swig
C:\Users\ARCHANA\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DSPHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -IC:\Users\ARCHANA\Anaconda\include -IC:\Users\ARCHANA\Anaconda\PC -c sphinxbase/src/libsphinxbase/lm\fsg_model.c -o build\temp.win-amd64-2.7\Release\sphinxbase\src\libsphinxbase\lm\fsg_model.o /wd4244 /wd4090 /wd4018
gcc.exe: error: /wd4244: No such file or directory
gcc.exe: error: /wd4090: No such file or directory
gcc.exe: error: /wd4018: No such file or directory
error: command 'gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Removing temporary dir c:\users\archana\appdata\local\temp\pip_build_ARCHANA...
Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\archana\\appdata\\local\\temp\\pip_build_ARCHANA\\pocketsphinx\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
Exception information:
Traceback (most recent call last):
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\commands\install.py", line 279, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 1380, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\req.py", line 699, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "C:\Users\ARCHANA\Anaconda\lib\site-packages\pip\util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command C:\Users\ARCHANA\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\archana\\appdata\\local\\temp\\pip_build_ARCHANA\\pocketsphinx\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\archana\appdata\local\temp\pip-f_ai9e-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\archana\appdata\local\temp\pip_build_ARCHANA\pocketsphinx
It seems you are using Anaconda python built with MinGW. The default pocketsphinx-python as mentioned in README is supposed to work with MSVC python (distributed from python.org), so it is not compatible with GCC python because it uses some MSVC-specific options in setup.py:
extra_compile_args.extend([
'/wd4244',
'/wd4267',
'/wd4197',
'/wd4090',
'/wd4018'
])
You have two choices:
Use default python for Windows which is compiled with MSVC
Remove that extra_compile_args from setup.py, then the package will probably build with MinGW gcc.
Christoph Gohlke kindly added a compiled version of pocketsphinx to his unofficial extension library.
If you are running Python 3.5 (32-bit) then download: "pocketsphinx-0.0.9-cp35-cp35m-win32.whl"
Here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pocketsphinx
Then run:
pip3 install "pocketsphinx-0.0.9-cp35-cp35m-win32.whl"

Categories