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/
Related
I am using bash terminal in vscode. When I try to run my code:
#!/usr/bin/env python3
from pyaudio import speech_recognition as sr
r = sr.Recognizer()
mic = sr.Microphone()
with mic as source:
audio = r.listen(source)
as seen in https://realpython.com/python-speech-recognition/#working-with-microphones I get this error:
python3 live_audio.py
Traceback (most recent call last):
File "live_audio.py", line 3, in <module>
from pyaudio import speech_recognition as sr
ModuleNotFoundError: No module named 'pyaudio'
I have pyaudio installed on my machine as in the cmd when I run "pip3 install pyaudio" it says:
Requirement already satisfied: pyaudio in c:\users\user1\appdata\local\programs\python\python39-32\lib\site-packages (0.2.11)"
However in the bash terminal when I run "pip3 install pyaudio" I get this error message:
pip3 install pyaudio
Defaulting to user installation because normal site-packages is not writeable
Collecting pyaudio
Using cached PyAudio-0.2.12.tar.gz (42 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyaudio
Building wheel for pyaudio (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyaudio (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
copying src/pyaudio.py -> build/lib.linux-x86_64-cpython-38
running build_ext
building '_portaudio' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv
-O2 -fPIC -I/usr/local/include -I/usr/include -I/usr/include/python3.8 -c src/_portaudiomodule.c -o build/temp.linux-x86_64-cpython-38/src/_portaudiomodule.o
src/_portaudiomodule.c:31:10: fatal error: portaudio.h: No such file or directory
31 | #include "portaudio.h"
| ^~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyaudio
Failed to build pyaudio
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
--- Logging error ---
Traceback (most recent call last):
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 177, in emit
self.console.print(renderable, overflow="ignore", crop=False, style=style)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1673, in print
extend(render(renderable, render_options))
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1305, in render
for render_output in iter_render:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
for line in lines:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
for segment in segments:
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/console.py", line 1283, in render
renderable = rich_cast(renderable)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
renderable = cast_method()
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
pip_cmd = get_best_invocation_for_this_pip()
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
if found_executable and os.path.samefile(
File "/usr/lib/python3.8/genericpath.py", line 101, in samefile
s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip'
Call stack:
File "/home/user1/.local/bin/pip3", line 8, in <module>
sys.exit(main())
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/main.py", l.py", line 70, in main
return command.main(cmd_args)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/base_comman_command.py", line 101, in main
return self._main(args)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/base_comman_command.py", line 223, in _main
self.handle_pip_version_check(options)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/cli/req_commandcommand.py", line 190, in handle_pip_version_check
pip_self_version_check(session, options)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/self_outdated_cdated_check.py", line 236, in pip_self_version_check
logger.warning("[present-rich] %s", upgrade_prompt)
File "/usr/lib/python3.8/logging/__init__.py", line 1446, in warning
self._log(WARNING, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1577, in _log
self.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1587, in handle
self.callHandlers(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1649, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 950, in handle
self.emit(record)
File "/home/user1/.local/lib/python3.8/site-packages/pip/_internal/utils/logging.pgging.py", line 179, in emit
self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.2', new='22.3'),)
I have also installed the .whl for my machine using "pip3 install PyAudio-0.2.11-cp38-cp38-win_amd64.whl" but I get this error (in bash terminal):
Defaulting to user installation because normal site-packages is not writeable
ERROR: PyAudio-0.2.11-cp38-cp38-win_amd64.whl is not a supported wheel on this
platform.
Does anyone have any idea what I'm doing wrong?
Thank you
I am trying to install a github repo named multiperson for PyTorch 1.6 and I get the following error. How can I make it work for PyTorch 1.6?
(base) mona#mona:~/research$ cd phosa/
(base) mona#mona:~/research/phosa$ mkdir -p external
(base) mona#mona:~/research/phosa$ git clone https://github.com/JiangWenPL/multiperson.git external/multiperson
Cloning into 'external/multiperson'...
remote: Enumerating objects: 752, done.
remote: Counting objects: 100% (752/752), done.
remote: Compressing objects: 100% (566/566), done.
remote: Total 752 (delta 189), reused 723 (delta 173), pack-reused 0
Receiving objects: 100% (752/752), 48.29 MiB | 46.26 MiB/s, done.
Resolving deltas: 100% (189/189), done.
(base) mona#mona:~/research/phosa$ pip install external/multiperson/neural_renderer
Processing ./external/multiperson/neural_renderer
Building wheels for collected packages: neural-renderer-pytorch
Building wheel for neural-renderer-pytorch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/mona/anaconda3/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ma51z6r7/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-ma51z6r7/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 /tmp/pip-wheel-nl9m5bw0
cwd: /tmp/pip-req-build-ma51z6r7/
Complete output (210 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/load_obj.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/perspective.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/vertices_to_faces.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/visibility.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/get_points_from_angles.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/look.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/projection.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/rasterize.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/save_obj.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/look_at.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/__init__.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/lighting.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/mesh.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/renderer.py -> build/lib.linux-x86_64-3.7/neural_renderer
creating build/lib.linux-x86_64-3.7/neural_renderer/cuda
copying neural_renderer/cuda/__init__.py -> build/lib.linux-x86_64-3.7/neural_renderer/cuda
running build_ext
building 'neural_renderer.cuda.load_textures' extension
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda
Emitting ninja build file /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/bin/nvcc -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/include/python3.7m -c -c /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda_kernel.cu -o /tmp/pip-req-
copying neural_renderer/look_at.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/__init__.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/lighting.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/mesh.py -> build/lib.linux-x86_64-3.7/neural_renderer
copying neural_renderer/renderer.py -> build/lib.linux-x86_64-3.7/neural_renderer
creating build/lib.linux-x86_64-3.7/neural_renderer/cuda
copying neural_renderer/cuda/__init__.py -> build/lib.linux-x86_64-3.7/neural_renderer/cuda
running build_ext
building 'neural_renderer.cuda.load_textures' extension
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer
creating /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda
Emitting ninja build file /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] c++ -MMD -MF /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda.o.d -pthread -B /home/mona/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/include/python3.7m -c -c /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp -o /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda.o
c++ -MMD -MF /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda.o.d -pthread -B /home/mona/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/include/python3.7m -c -c /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp -o /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Parallel.h:149,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
from /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/ParallelOpenMP.h:84: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
84 | #pragma omp parallel for if ((end - begin) >= grain_size)
|
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp: In function ‘at::Tensor load_textures(at::Tensor, at::Tensor, at::Tensor, at::Tensor, int, int)’:
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
| ^
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
| ^~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:28:5: note: in expansion of macro ‘CHECK_INPUT’
28 | CHECK_INPUT(image);
| ^~~~~~~~~~~
In file included from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
from /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:30: note: declared here
268 | DeprecatedTypeProperties & type() const {
| ^~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:15:23: error: ‘AT_CHECK’ was not declared in this scope; did you mean ‘DCHECK’?
15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
| ^~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
| ^~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:28:5: note: in expansion of macro ‘CHECK_INPUT’
28 | CHECK_INPUT(image);
| ^~~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
| ^
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
| ^~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:29:5: note: in expansion of macro ‘CHECK_INPUT’
29 | CHECK_INPUT(faces);
| ^~~~~~~~~~~
In file included from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
from /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:30: note: declared here
268 | DeprecatedTypeProperties & type() const {
| ^~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
| ^
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
| ^~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:30:5: note: in expansion of macro ‘CHECK_INPUT’
30 | CHECK_INPUT(is_update);
| ^~~~~~~~~~~
In file included from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
from /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:30: note: declared here
268 | DeprecatedTypeProperties & type() const {
| ^~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:15:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
15 | #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
| ^
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:17:24: note: in expansion of macro ‘CHECK_CUDA’
17 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
| ^~~~~~~~~~
/tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:31:5: note: in expansion of macro ‘CHECK_INPUT’
31 | CHECK_INPUT(textures);
| ^~~~~~~~~~~
In file included from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Tensor.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/Context.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/ATen.h:5,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/all.h:4,
from /home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/torch.h:3,
from /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda.cpp:1:
/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/ATen/core/TensorBody.h:268:30: note: declared here
268 | DeprecatedTypeProperties & type() const {
| ^~~~
[2/2] /usr/bin/nvcc -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/TH -I/home/mona/anaconda3/lib/python3.7/site-packages/torch/include/THC -I/home/mona/anaconda3/include/python3.7m -c -c /tmp/pip-req-build-ma51z6r7/neural_renderer/cuda/load_textures_cuda_kernel.cu -o /tmp/pip-req-build-ma51z6r7/build/temp.linux-x86_64-3.7/neural_renderer/cuda/load_textures_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=load_textures -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/mona/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
env=env)
File "/home/mona/anaconda3/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-ma51z6r7/setup.py", line 40, in <module>
cmdclass = {'build_ext': BuildExtension}
File "/home/mona/anaconda3/lib/python3.7/site-packages/setuptools/__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/home/mona/anaconda3/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/mona/anaconda3/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/mona/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/mona/anaconda3/lib/python3.7/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/mona/anaconda3/lib/python3.7/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/mona/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/mona/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/mona/anaconda3/lib/python3.7/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/mona/anaconda3/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/mona/anaconda3/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/mona/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 87, in run
_build_ext.run(self)
File "/home/mona/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/mona/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/mona/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions
build_ext.build_extensions(self)
File "/home/mona/anaconda3/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/mona/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/mona/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/mona/anaconda3/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
_build_ext.build_extension(self, ext)
File "/home/mona/anaconda3/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension
depends=ext.depends)
File "/home/mona/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile
with_cuda=with_cuda)
File "/home/mona/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1233, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/mona/anaconda3/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
raise RuntimeError(message)
RuntimeError: Error compiling objects for extension
----------------------------------------
Rolling back uninstall of neural-renderer-pytorch
Moving to /home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer/
from /home/mona/anaconda3/lib/python3.7/site-packages/~eural_renderer
Moving to /home/mona/anaconda3/lib/python3.7/site-packages/neural_renderer_pytorch-1.1.3.dist-info/
from /home/mona/anaconda3/lib/python3.7/site-packages/~eural_renderer_pytorch-1.1.3.dist-info
ERROR: Command errored out with exit status 1: /home/mona/anaconda3/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ma51z6r7/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-ma51z6r7/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ul8nk1jn/install-record.txt --single-version-externally-managed --compile --install-headers /home/mona/anaconda3/include/python3.7m/neural-renderer-pytorch Check the logs for full command output.
I have:
$ python
Python 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.6.0'
$ lsb_release -a
LSB Version: core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
$ nvidia-smi
Sun Dec 6 16:36:36 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02 Driver Version: 450.80.02 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 2070 Off | 00000000:01:00.0 Off | N/A |
| N/A 49C P8 21W / N/A | 1546MiB / 7982MiB | 8% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
You would need to change all AT_CHECK in neural mesh renderer to TORCH_CHECK
(base) mona#mona:~/research/phosa/external/multiperson/neural_renderer$ rg AT_CHECK
neural_renderer/cuda/load_textures_cuda.cpp
15:#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
16:#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
neural_renderer/cuda/create_texture_image_cuda.cpp
13:#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
14:#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
neural_renderer/cuda/rasterize_cuda.cpp
69:#define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
70:#define CHECK_CONTIGUOUS(x) AT_CHECK(x.is_contiguous(), #x " must be contiguous")
(base) mona#mona:~/research/phosa$ pip install external/multiperson/neural_renderer
Processing ./external/multiperson/neural_renderer
Building wheels for collected packages: neural-renderer-pytorch
Building wheel for neural-renderer-pytorch (setup.py) ... done
Created wheel for neural-renderer-pytorch: filename=neural_renderer_pytorch-1.1.3-cp37-cp37m-linux_x86_64.whl size=6321659 sha256=5e2f4afc2346a90c5cd804b226dd7c424ab95f477aad67f2ca3f15530484fbc6
Stored in directory: /tmp/pip-ephem-wheel-cache-_rf6c5ld/wheels/c7/1b/84/10bf7a286a267887d8c7d382677c292cf18e1bba4e2508ed33
Successfully built neural-renderer-pytorch
Installing collected packages: neural-renderer-pytorch
Attempting uninstall: neural-renderer-pytorch
Found existing installation: neural-renderer-pytorch 1.1.3
Uninstalling neural-renderer-pytorch-1.1.3:
Successfully uninstalled neural-renderer-pytorch-1.1.3
Successfully installed neural-renderer-pytorch-1.1.3
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 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.
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.