I'm trying to convert my main.py script to an executable on Mac using pyinstaller and I'm having difficulties doing so.
pyinstaller --onefile main.py seems to go through without a hitch, but when I try to launch the resulting executable, I get the following message:
Traceback (most recent call last):
File "/Users/waterfalls/PycharmProjects/newnew/dist/main.app/Contents/Resources/__boot__.py", line 148, in <module>
_run()
File "/Users/waterfalls/PycharmProjects/newnew/dist/main.app/Contents/Resources/__boot__.py", line 82, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Users/waterfalls/PycharmProjects/newnew/dist/main.app/Contents/Resources/main.py", line 6, in <module>
import cairosvg.svg
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "cairosvg/__init__.pyc", line 37, in <module>
FileNotFoundError: [Errno 2] No such file or directory: '/Users/waterfalls/PycharmProjects/newnew/dist/main.app/Contents/MacOS/VERSION'
2018-10-14 03:25:55.473 main[23382:4662269] main Error
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
The VERSION file it is flagging really isn't there. I am unsure how to make it be there
Building the program with pyinstaller --windowed main.py yeilds a lot of failed to copy flag warnings:
15490 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/ascii.enc
15513 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/macTurkish.enc
15517 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tm.tcl
15520 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/cp874.enc
15525 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/en_nz.msg
15528 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/pkgIndex.tcl
15531 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/comdlg.tcl
15534 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/msgs/sv.msg
15538 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/choosedir.tcl
15540 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/msgs/es.msg
15542 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/msgs/cs.msg
15544 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/de_at.msg
15546 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/ttk/cursors.tcl
15549 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/init.tcl
15550 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/ro.msg
15553 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/gb2312.enc
15555 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/zh_cn.msg
15557 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/shiftjis.enc
15560 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/cp850.enc
15562 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/iso8859-1.enc
15563 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/bn.msg
15565 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/sh.msg
15567 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/ms_my.msg
15569 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/tk.tcl
15572 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/pt.msg
15575 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/http1.0/http.tcl
15576 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/en_gb.msg
15577 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/ttk/menubutton.tcl
15580 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/gv_gb.msg
15582 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_py.msg
15583 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/tclDTrace.d
15584 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/nb.msg
15586 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_uy.msg
15587 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/nn.msg
15591 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/msgs/da.msg
15592 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/eu.msg
15594 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/ttk/progress.tcl
15600 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/koi8-r.enc
15601 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/fa.msg
15602 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_pe.msg
15603 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/macRomania.enc
15604 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/te.msg
15606 WARNING: failed to copy flags of /System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts/ttk/defaults.tcl
15608 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_ve.msg
15609 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/es_pr.msg
15611 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/msgs/id.msg
15614 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/clock.tcl
15617 WARNING: failed to copy flags of /System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/encoding/gb2312-raw.enc
etc
cairosvg --version gets me 2.2.1
python3 --version is 3.7.0
pyinstaller --version is 3.5.dev0+0b6f1ec6f (tried to fix this issue by updating to a devbuild)
Has anyone else experienced this? What can I do to compile a working executable?
EDIT #1:
Okay, so the problem definitely lies somewhere within the cairosvg and pyinstaller, since as soon as I comment out the parts using that library, the app successfully launches and works. I suspect PyInstaller is not copying the files required for the bundle to work from cairo since they are not of the right format.
Related
I have CMake tool installed using Visual STudio Build tools 2019. I have rechecked my ENV variables multiple times.
I have tried installation using the Source. I have followed this and all the other discussions as well.
Here is the detailed error
running install
C:\Users\asus\PycharmProjects\drowsiness-detection\envt\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(
C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\command\easy_install.py:160: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing tools/python\dlib.egg-info\PKG-INFO
writing dependency_links to tools/python\dlib.egg-info\dependency_links.txt
writing top-level names to tools/python\dlib.egg-info\top_level.txt
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
reading manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\cmake_utils\*\build*'
no previously-included directories found matching 'dlib\test'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.10.2 (tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\lib
.win-amd64-3.10 -DPYTHON_EXECUTABLE=C:\Users\asus\PycharmProjects\drowsiness-detection\envt\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\lib.win-amd64-3.10 -A x64'
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.22000.
CMake Error at CMakeLists.txt:14 (project):
Failed to run MSBuild command:
C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/Bin/MSBuild.exe
to get the value of VCTargetsPath:
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 27-Feb-22 6:58:45 PM.
Project "C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\temp.win-amd64-3.10\Release\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" on node 1 (default targets).
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17763.0
was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\temp.win-amd64-3.10\Release\CMakeFiles\3.18.4\VCTargetsPath.vcxproj]
Done Building Project "C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\temp.win-amd64-3.10\Release\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\temp.win-amd64-3.10\Release\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" (default target) (1) ->
(_CheckWindowsSDKInstalled target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.WindowsSDK.targets(46,5): error MSB8036: The Windows SDK version 10.0.17763
.0 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\build\temp.win-amd64-3.10\Release\CMakeFiles\3.18.4\VCTargetsPath.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.21
Exit code: 1
-- Configuring incomplete, errors occurred!
See also "C:/Users/asus/Downloads/dlib-19.23.0/dlib-19.23.0/build/temp.win-amd64-3.10/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\setup.py", line 222, in <module>
setup(
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
return run_commands(dist)
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\command\install.py", line 74, in run
self.do_egg_install()
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\command\install.py", line 116, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\asus\PycharmProjects\drowsiness-detection\envt\lib\site-packages\setuptools\_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
self.build_extension(ext)
File "C:\Users\asus\Downloads\dlib-19.23.0\dlib-19.23.0\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\asus\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\asus\\Downloads\\dlib-19.23.0\\dlib-19.23.0\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\asus\\Downloads\\dlib-19.23.0\\dlib-19.23.0\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Users\\asus\\PycharmProjects\\drowsiness-detection\\envt\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\asus\\Downloads\\dlib-19.23.0\\dlib-19.23.0\\build\\lib.win-amd64-3.10', '-A', 'x64']' returned non-zero exit status 1.
I am not using Anacodna and I am on Windows 10 platform. Any help is much appreciated.
Do you have Windows SDK version 10.0.17763.0 installed? It should look something like this screenshot:
On Windows 10 Build 14393 with Python 3.7.0, Cython 0.29.6 and MinGW32 located at C:\MinGW with the path C:\MinGW\bin on the system PATH environment variable, I am unable to get Cython code to compile using MingW. When I attempt to, I receive the following:
running build_ext
building 'abc_image_stats' extension
error: Unable to find vcvarsall.bat
c:\program files\python\python37\lib\site-packages\Cython\Compiler\Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\abc\Downloads\python\abc_image_stats\abc_image_stats.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
I have tried various fixes, such as those mentioned here, to no avail. After making the config file as instructed in that solution, (but before changing cgwinccompiler.py), I attempted to compile again but then received this error:
running build_ext
Traceback (most recent call last):
File "setup.py", line 7, in <module>
include_dirs=[numpy.get_include()] # https://stackoverflow.com/a/14657667
File "C:\Program Files\Python\Python37\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\Python\Python37\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\Python\Python37\lib\distutils\command\build_ext.py", line 308, in run
force=self.force)
File "C:\Program Files\Python\Python37\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Program Files\Python\Python37\lib\distutils\cygwinccompiler.py", line 282, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Program Files\Python\Python37\lib\distutils\cygwinccompiler.py", line 157, in __init__
self.dll_libraries = get_msvcr()
File "C:\Program Files\Python\Python37\lib\distutils\cygwinccompiler.py", line 86, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1914
c:\program files\python\python37\lib\site-packages\Cython\Compiler\Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\abc\Downloads\python\abc_image_stats\abc_image_stats.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
So then I did the last two steps; I added
elif msc_ver == '1914':
# Visual Studio 2015 / Visual C 14.0
# "msvcr140.dll no longer exists" http://blogs.msdn.com/b/vcblog/archive/2014/06/03/visual-studio-14-ctp.aspx
return ['vcruntime140']
to the cygwinccompiler.py file and copied vcruntime140.dll to the C:\Program Files\Python\Python37\libs folder, but then I receive this error upon attempting to compile:
running build_ext
building 'abc_image_stats' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall "-IC:\Program Files\Python\Python37\lib\site-packages\numpy\core\include" "-IC:\Program Files\Python\Python37\include" "-IC:\Program Files\Python\Python37\include" -c abc_image_stats.c -o build\temp.win-amd64-3.7\Release\abc_image_stats.o
In file included from C:\Program Files\Python\Python37\include/Python.h:68:0,
from abc_image_stats.c:4:
C:\Program Files\Python\Python37\include/pytime.h:123:59: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
PyAPI_FUNC(int) _PyTime_FromTimeval(_PyTime_t *tp, struct timeval *tv);
^~~~~~~
C:\Program Files\Python\Python37\include/pytime.h:130:12: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
struct timeval *tv,
^~~~~~~
C:\Program Files\Python\Python37\include/pytime.h:135:12: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
struct timeval *tv,
^~~~~~~
writing build\temp.win-amd64-3.7\Release\abc_image_stats.cp37-win_amd64.def
C:\MinGW\bin\gcc.exe -shared -s build\temp.win-amd64-3.7\Release\abc_image_stats.o build\temp.win-amd64-3.7\Release\abc_image_stats.cp37-win_amd64.def "-LC:\Program Files\Python\Python37\libs" "-LC:\Program Files\Python\Python37\PCbuild\amd64" -lpython37 -lvcruntime140 -o C:\Users\abc\Downloads\python\abc_image_stats\abc_image_stats.cp37-win_amd64.pyd
C:\Program Files\Python\Python37\libs/libpython37.a: error adding symbols: File format not recognized
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\MinGW\\bin\\gcc.exe' failed with exit status 1
c:\program files\python\python37\lib\site-packages\Cython\Compiler\Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\abc\Downloads\python\abc_image_stats\abc_image_stats.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
To be clear, my setup.py file looks like this:
from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup(
ext_modules = cythonize("abc_image_stats.pyx"),
include_dirs=[numpy.get_include()] # https://stackoverflow.com/a/14657667
)
and I am attempting to compile using python setup.py build_ext --inplace via the command line.
All I want to do is compile the Cython code on a Windows 10 machine using MingW. I've tried everything I can think of and don't know what's wrong. Any ideas on how to solve this?
try to change
elif msc_ver == '1914':
return ['vcruntime140']
to return ['msvcr100']
this worked for me, don't really know why though
I'm trying create an executable from my code that uses PyQt5. I'm using Python 3.5.3 -64 bits, developing in Windows 10, and used pip to install pyinstaller 3.2.1.
I run pyinstaller as such:
pyinstaller.exe --onefile --windowed main.py
I get an Import Error:
File "C:\Python35\Scripts\pyinstaller-script.py", line 11, in <module> load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')()
File "C:\Python35\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "C:\Python35\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
return ep.load()
File "C:\Python35\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
return self.resolve()
File "C:\Python35\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "C:\Python35\lib\site-packages\PyInstaller\__main__.py", line 21, in <module>
import PyInstaller.building.build_main
File "C:\Python35\lib\site-packages\PyInstaller\building\build_main.py", line 32, in <module>
from ..depend import bindepend
File "C:\Python35\lib\site-packages\PyInstaller\depend\bindepend.py", line 38, in <module>
from ..utils.win32.winmanifest import RT_MANIFEST
File "C:\Python35\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", line 97, in <module>
from PyInstaller.utils.win32 import winresource
File "C:\Python35\lib\site-packages\PyInstaller\utils\win32\winresource.py", line 20, in <module>
import pywintypes
File "C:\Python35\lib\site-packages\win32\lib\pywintypes.py", line 124, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "C:\Python35\lib\site-packages\win32\lib\pywintypes.py", line 64, in __import_pywin32_system_module__
import _win32sysloader
ImportError: DLL load failed: The specified module could not be found.
I've read that this meanings pywin32 was not installed by pip and that I need to install this Microsoft Visual Package: https://www.microsoft.com/en-us/download/details.aspx?id=5555. I downloaded and installed it but I'm getting the same error.
Edit:
After installing pywin32 from sourceforge.net/projects/pywin32/files/pywin32/Build%20221, the import error is gone but I'm getting warnings when it's running (the output is hundreds of lines long, here is a snippet):
pyinstaller main.py
....
3220 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of C:\Python35\python.exe
3251 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of C:\Python35\python.exe
3267 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of C:\Python35\python.exe
3305 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Python35\python.exe
3336 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of C:\Python35\python.exe
....
9265 WARNING: lib not found: Qt5Core.dll dependency of C:\Python35\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
9297 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of C:\Python35\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
9333 WARNING: lib not found: Qt5Gui.dll dependency of C:\Python35\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
9366 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of C:\Python35\lib\site-packages\PyQt5\Qt\plugins\imageformats\qgif.dll
Then I run:
pyinstaller main.spec
and get similar warnings. The resulting exe file closes immediately.
you need to install pyinstaller and pywin32, which is same bit version as your python bit version is.
Get it from here: https://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/
choose amd64 ones if your python is 64-bit else non-amd64 ones
If you face any registry problems (or) Python installation directory not found issues, I can help
My OS: Mac OS X El Capitan
When I install cryptography like this:
pip install cryptography==0.2.1
The error was:
Collecting cryptography==0.2.1
Using cached cryptography-0.2.1.tar.gz
Complete output from command python setup.py egg_info:
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Installed /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/six-1.10.0-py2.7.egg
Searching for cffi>=0.8
Reading https://pypi.python.org/simple/cffi/
Best match: cffi 1.5.0
Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.5.0.tar.gz#md5=dec8441e67880494ee881305059af656
Processing cffi-1.5.0.tar.gz
Writing /var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/easy_install-ZAtQYR/cffi-1.5.0/setup.cfg
Running cffi-1.5.0/setup.py -q bdist_egg --dist-dir /var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/easy_install-ZAtQYR/cffi-1.5.0/egg-dist-tmp-Dl08xt
creating /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg
Extracting cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg to /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs
Installed /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg
Searching for pycparser
Reading https://pypi.python.org/simple/pycparser/
Best match: pycparser 2.14
Downloading https://pypi.python.org/packages/source/p/pycparser/pycparser-2.14.tar.gz#md5=a2bc8d28c923b4fe2b2c3b4b51a4f935
Processing pycparser-2.14.tar.gz
Writing /var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/easy_install-80l9Lo/pycparser-2.14/setup.cfg
Running pycparser-2.14/setup.py -q bdist_egg --dist-dir /var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/easy_install-80l9Lo/pycparser-2.14/egg-dist-tmp-5dC3Ib
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
Copying pycparser-2.14-py2.7.egg to /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs
Installed /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/pycparser-2.14-py2.7.egg
running egg_info
creating pip-egg-info/cryptography.egg-info
writing requirements to pip-egg-info/cryptography.egg-info/requires.txt
writing pip-egg-info/cryptography.egg-info/PKG-INFO
writing top-level names to pip-egg-info/cryptography.egg-info/top_level.txt
writing dependency_links to pip-egg-info/cryptography.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/cryptography.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
cryptography/hazmat/bindings/__pycache__/_cffi__xfdb41ad9xb4fc9075.c:369:5: error: conflicting types for 'ASN1_GENERALIZEDTIME_check'
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *);
^
/usr/local/include/openssl/asn1.h:856:5: note: previous declaration is here
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
^
1 error generated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/setup.py", line 113, in <module>
"build": cffi_build,
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 180, in run
self.find_sources()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 207, in find_sources
mm.run()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 291, in run
self.add_defaults()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 320, in add_defaults
sdist.add_defaults(self)
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/sdist.py", line 118, in add_defaults
build_py = self.get_finalized_command('build_py')
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command
cmd_obj.ensure_finalized()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/site-packages/setuptools/command/build_py.py", line 28, in finalize_options
orig.build_py.finalize_options(self)
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/command/build_py.py", line 46, in finalize_options
('force', 'force'))
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/cmd.py", line 298, in set_undefined_options
src_cmd_obj.ensure_finalized()
File "/Users/username/.pyenv/versions/2.7.11/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
self.finalize_options()
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/setup.py", line 55, in finalize_options
OpenSSLBinding().ffi.verifier.get_extension(),
File "cryptography/hazmat/bindings/openssl/binding.py", line 83, in __init__
self._ensure_ffi_initialized()
File "cryptography/hazmat/bindings/openssl/binding.py", line 99, in _ensure_ffi_initialized
libraries)
File "cryptography/hazmat/bindings/utils.py", line 72, in build_ffi
ext_package="cryptography",
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg/cffi/api.py", line 433, in verify
lib = self.verifier.load_library()
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg/cffi/verifier.py", line 110, in load_library
self._compile_module()
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg/cffi/verifier.py", line 207, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg/cffi/ffiplatform.py", line 29, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose)
File "/private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography/.eggs/cffi-1.5.0-py2.7-macosx-10.11-x86_64.egg/cffi/ffiplatform.py", line 62, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.ffiplatform.VerificationError: CompileError: command 'clang' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/48/lrr_y58s4rq70qdnjcvqc8l8j2g31b/T/pip-build-zGO9s0/cryptography
I am sure that I have upgrade the openssl to the newest version:
$ openssl version
OpenSSL 1.0.2f 28 Jan 2016
But I don't know how to fix it. Even I checked the official documentation:
https://cryptography.io/en/latest/installation/#building-cryptography-on-os-x
And follow that to do, the result was the same.
brew to the rescue:
brew install openssl
then brew gives a hint:
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
So just export these env vars and rerun your favorite pip install (or better to avoid havoc in future add following to your ~/.bash_profile:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
This worked for me like a charm!
Trying to install the scrapy I need to install cryptography package on Mac OS El Capitan. As explained in Cryptography installation doc
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
I had tried just about everything on this but still kept getting the following error:
... SWIG/_m2crypto_wrap.c:5258:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return BIO_do_handshake(bio);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/openssl/include/openssl/bio.h:502:34: note: expanded from macro 'BIO_do_handshake'
# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:7640:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return BIO_ctrl(bio, BIO_C_SET_SSL, flag, (char *)ssl);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:7699:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
err = ERR_get_error();
~ ^~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:7751:59: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
ms = ((start->tv_sec + (int)timeout) - tv.tv_sec) * 1000;
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
SWIG/_m2crypto_wrap.c:7996:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
err = ERR_get_error();
~ ^~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:8026:37: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
r = SSL_write(ssl, buf.buf, buf.len);
~~~~~~~~~ ~~~~^~~
SWIG/_m2crypto_wrap.c:8069:37: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
r = SSL_write(ssl, buf.buf, buf.len);
~~~~~~~~~ ~~~~^~~
SWIG/_m2crypto_wrap.c:8087:19: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
err = ERR_get_error();
~ ^~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:8143:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return SSL_CTX_set_session_cache_mode(ctx, mode);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/openssl/include/openssl/ssl.h:2484:9: note: expanded from macro 'SSL_CTX_set_session_cache_mode'
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:8148:12: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
return SSL_CTX_get_session_cache_mode(ctx);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/opt/openssl/include/openssl/ssl.h:2486:9: note: expanded from macro 'SSL_CTX_get_session_cache_mode'
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:8680:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
outlen = BIO_ctrl_pending(bio);
~ ^~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:8742:14: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
outlen = BIO_ctrl_pending(bio);
~ ^~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:22694:14: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
arg4 = len;
~ ^~~
SWIG/_m2crypto_wrap.c:25282:14: warning: implicit conversion loses integer precision: 'Py_ssize_t' (aka 'long') to 'int' [-Wshorten-64-to-32]
arg3 = len;
~ ^~~
21 warnings generated.
SWIG/_m2crypto_wrap.c:2894:9: warning: variable 'res' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (PyType_Ready(tp) < 0)
^~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:2918:10: note: uninitialized use occurs here
return res;
^~~
SWIG/_m2crypto_wrap.c:2894:5: note: remove the 'if' if its condition is always false
if (PyType_Ready(tp) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~
SWIG/_m2crypto_wrap.c:2875:10: note: initialize the variable 'res' to silence this warning
int res;
^
= 0
1 warning generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -L/usr/local/opt/openssl/lib -I/usr/local/opt/openssl/include build/temp.macosx-10.13-intel-2.7/SWIG/_m2crypto_wrap.o -L/usr/lib -lssl -lcrypto -o build/lib.macosx-10.13-intel-2.7/M2Crypto/_m2crypto.so
ld: warning: ignoring file /usr/local/opt/openssl/lib/libssl.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/opt/openssl/lib/libssl.dylib
ld: warning: ignoring file /usr/local/opt/openssl/lib/libcrypto.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/opt/openssl/lib/libcrypto.dylib
running install_lib
creating /Library/Python/2.7/site-packages/M2Crypto
error: could not create '/Library/Python/2.7/site-packages/M2Crypto': Permission denied
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/q5/qk1gf6z15kschmf5dwb3mqvh0000gn/T/pip-build-WyOs_y/M2crypto/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/q5/qk1gf6z15kschmf5dwb3mqvh0000gn/T/pip-tp6pQY-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/q5/qk1gf6z15kschmf5dwb3mqvh0000gn/T/pip-build-WyOs_y/M2crypto/
I had the hardest time getting it working. The fix ended up being a simple chmod as sudo:
sudo chmod 777 /Library/Python/2.7/site-packages/
I wrote a script a few months ago using python. In this script I use weave. This script used to work, but I retried running my program today after a few month and it doesn't work anymore. I get this error:
USAGE: facedetect.py [--cascade <cascade_fn>] [--nested-cascade <cascade_fn>] [<video_source>]
Found executable C:\strawberry\c\bin\g++.exe
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs\libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/libpython27.a when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs/python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:\python2.7\libs\python27.lib when searching for -lpython27
c:/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython27
collect2: ld returned 1 exit status
Traceback (most recent call last):
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\facedetect.py", line 87, in <module>
processFrame(roi,gabor)
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\facedetect.py", line 51, in processFrame
im = Image.fromarray(gabor.rlbp_fast_blitz(superimposed[(i*stepHeight):((i+1)*stepHeight),(j*stepWidth):((j+1)*stepWidth)]))
File "C:\Users\Olivier.Janssens\Documents\onlinelearning\onlinelearning\gaborModule.py", line 80, in rlbp_fast_blitz
weave.blitz(expr, arg_dict, check_size=0)
File "C:\python2.7\lib\site-packages\scipy\weave\blitz_tools.py", line 62, in blitz
**kw)
File "C:\python2.7\lib\site-packages\scipy\weave\inline_tools.py", line 482, in compile_function
verbose=verbose, **kw)
File "C:\python2.7\lib\site-packages\scipy\weave\ext_tools.py", line 367, in compile
verbose = verbose, **kw)
File "C:\python2.7\lib\site-packages\scipy\weave\build_tools.py", line 272, in build_extension
setup(name = module_name, ext_modules = [ext],verbose=verb)
File "C:\python2.7\lib\site-packages\numpy\distutils\core.py", line 186, in setup
return old_setup(**new_attr)
File "C:\python2.7\lib\distutils\core.py", line 169, in setup
raise SystemExit, "error: " + str(msg)
distutils.errors.CompileError: error: Command "g++ -shared c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_intermediate\compiler_5b1f9617507e215394a4b4c2536b23c6\Release\users\olivie~1.jan\appdata\local\temp\olivier.janssens\python27_compiled\sc_24e057e16c3730b6904be220694a322419.o c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_intermediate\compiler_5b1f9617507e215394a4b4c2536b23c6\Release\python2.7\lib\site-packages\scipy\weave\scxx\weave_imp.o -LC:\python2.7\libs -LC:\python2.7\PCbuild -lpython27 -lmsvcr90 -o c:\users\olivie~1.jan\appdata\local\temp\Olivier.Janssens\python27_compiled\sc_24e057e16c3730b6904be220694a322419.pyd" failed with exit status 1
The error states: cannot find -lpython27
this is how the folder looks like (which the program is using)
Some extra information: I have a 64 bit pc, running windows 7, python is 32 bit.
Recently my Path variable was cleared, though I've added the python path to it, maybe I need to add something here too ?
It is finding python27.lib (in the python folder) but is skipping it as incompatible most likely as it was built with Visual C++ and you are using gcc - You probably had a gcc build of python on your path - if so you need to add it back or set the linker path to include . i.e. the current directory.