I am quite new to Python, so maybe this is something quite dumb. I tried to install the Flask module in PyCharm, first in the preference window, later in the python console (but the built in).
I am on a MacBook with the newest OS, using Python 3.9. The error message in the python console is the following:
$ pip3 install Flask
Collecting Flask
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Requirement already satisfied: click>=5.1 in ./venv/lib/python3.9/site-packages (from Flask) (7.1.2)
Collecting itsdangerous>=0.24
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2>=2.10.1
Using cached Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1.tar.gz (19 kB)
Collecting Werkzeug>=0.15
Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/path/to/folder/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py'"'"'; __file__='"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/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 /private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-wheel-inl8hwcr
cwd: /private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/
Complete output (79 lines):
/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11-x86_64-3.9
creating build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_constants.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/__init__.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_native.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_compat.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
running egg_info
writing src/MarkupSafe.egg-info/PKG-INFO
writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
writing top-level names to src/MarkupSafe.egg-info/top_level.txt
reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
copying src/markupsafe/_speedups.c -> build/lib.macosx-11-x86_64-3.9/markupsafe
running build_ext
building 'markupsafe._speedups' extension
creating build/temp.macosx-11-x86_64-3.9
creating build/temp.macosx-11-x86_64-3.9/src
creating build/temp.macosx-11-x86_64-3.9/src/markupsafe
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/Users//Users/path/to/folder/venv/include -I/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/markupsafe/_speedups.c -o build/temp.macosx-11-x86_64-3.9/src/markupsafe/_speedups.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 105, in <module>
run_setup(True)
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 53, in run_setup
setup(
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users//Users/path/to/folder/venv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 36, in run
build_ext.run(self)
File "/Users//Users/path/to/folder/venv/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 66, in run
_build_ext.run(self)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 42, in build_extension
build_ext.build_extension(self, ext)
File "/Users//Users/path/to/folder/venv/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 178, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/spawn.py", line 66, in spawn
if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
AttributeError: 'int' object has no attribute 'split'
----------------------------------------
ERROR: Failed building wheel for MarkupSafe
Running setup.py clean for MarkupSafe
Failed to build MarkupSafe
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, Flask
Running setup.py install for MarkupSafe ... error
ERROR: Command errored out with exit status 1:
command: /Users//Users/path/to/folder/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py'"'"'; __file__='"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-record-86v7atd3/install-record.txt --single-version-externally-managed --compile --install-headers /Users//Users/path/to/folder/venv/include/site/python3.9/MarkupSafe
cwd: /private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/
Complete output (81 lines):
/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib.macosx-11-x86_64-3.9
creating build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_constants.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/__init__.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_native.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
copying src/markupsafe/_compat.py -> build/lib.macosx-11-x86_64-3.9/markupsafe
running egg_info
writing src/MarkupSafe.egg-info/PKG-INFO
writing dependency_links to src/MarkupSafe.egg-info/dependency_links.txt
writing top-level names to src/MarkupSafe.egg-info/top_level.txt
reading manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'src/MarkupSafe.egg-info/SOURCES.txt'
copying src/markupsafe/_speedups.c -> build/lib.macosx-11-x86_64-3.9/markupsafe
running build_ext
building 'markupsafe._speedups' extension
creating build/temp.macosx-11-x86_64-3.9
creating build/temp.macosx-11-x86_64-3.9/src
creating build/temp.macosx-11-x86_64-3.9/src/markupsafe
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/Users//Users/path/to/folder/venv/include -I/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/markupsafe/_speedups.c -o build/temp.macosx-11-x86_64-3.9/src/markupsafe/_speedups.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 105, in <module>
run_setup(True)
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 53, in run_setup
setup(
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/path/to/folder/venv/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 36, in run
build_ext.run(self)
File "/Users/path/to/folder/venv/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 66, in run
_build_ext.run(self)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py", line 42, in build_extension
build_ext.build_extension(self, ext)
File "/Users/path/to/folder/venv/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 178, in build_extension
_build_ext.build_extension(self, ext)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/local/Cellar/python#3.9/3.9.0_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/spawn.py", line 66, in spawn
if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
AttributeError: 'int' object has no attribute 'split'
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/path/to/folder/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py'"'"'; __file__='"'"'/private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-install-sb0tfj2q/markupsafe_e3db55149f5e41369ae6e06e7eb56406/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cj/q_3ynbn564962bgf9614pgpc0000gn/T/pip-record-86v7atd3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/path/to/folder/venv/include/site/python3.9/MarkupSafe Check the logs for full command output.
(venv)
(I censored the path in this code block, everything else is original)
With googling I found different solutions, like downgrading setuptools to 21.2.1 for example, installing python wheel. I did not find MarkupSafe Wheels.
But nothing helped, even trying to install flask by easy_install was unsuccessful.
Maybe someone encountered the same problem and can help me or has any idea?
"Downgrading" to Python 3.8 solved this problem as flask does not support Python 3.9. Thanks for helping # sahasrara62 and # A DUBEY!
Related
C:\WINDOWS\system32>pip install face-recognition
Collecting face-recognition
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: numpy in c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages (from face-recognition) (1.19.1)
Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages (from face-recognition) (0.3.0)
Requirement already satisfied: Pillow in c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages (from face-recognition) (7.2.0)
Collecting dlib>=19.7
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Requirement already satisfied: Click>=6.0 in c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages (from face-recognition) (7.1.2)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\DELL\AppData\Local\Temp\pip-wheel-xf9e0i7s'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\
Complete output (58 lines):
running bdist_wheel
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=c:\users\dell\appdata\local\programs\python\python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\build\lib.win32-3.8'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 223, in <module>
setup(
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\build\\lib.win32-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\dell\\appdata\\local\\programs\\python\\python38-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\build\\lib.win32-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\dell\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp\pip-record-k_fgj9zq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dell\appdata\local\programs\python\python38-32\Include\dlib'
cwd: C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\
Complete output (60 lines):
running install
running build
running build_py
package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=c:\users\dell\appdata\local\programs\python\python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\build\lib.win32-3.8'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 223, in <module>
setup(
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\DELL\AppData\Local\Temp\pip-install-ffmft1wf\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\dell\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\build\\lib.win32-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\dell\\appdata\\local\\programs\\python\\python38-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\build\\lib.win32-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\dell\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\DELL\\AppData\\Local\\Temp\\pip-install-ffmft1wf\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DELL\AppData\Local\Temp\pip-record-k_fgj9zq\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dell\appdata\local\programs\python\python38-32\Include\dlib' Check the logs for full command output.
Have you try this steps? Face-recognition on windows
Officially this package is not supporting windows but this steps might be help you.
Also the another way is you can download it's environment with virtual box on windows system. From here pre-configured VM
I guess it will help you. Thank you
Why don't you adopt deepface? It is more lightweight and it covers Keras based facial recognition models. In other words, it is easier to install and run.
#!pip install deepface
from deepface import DeepFace
models = ["VGG-Face", "Facenet", "OpenFace", "DeepFace", "DeepID"]
res = DeepFace.verify("img1.jpg", "img2.jpg", model_name = models[0])
I've looked online for a solution but haven't found one.
I have a new computer which is the first desktop I own and I need to install python and pip and all these things for a high school project, but when installing PyTorch and other packages I need I am met with this error:
C:\Users\Owlsoul>pip3 install torch
Defaulting to user installation because normal site-packages is not writeable
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Collecting pyyaml
Using cached PyYAML-5.3.1.tar.gz (269 kB)
Building wheels for collected packages: torch, pyyaml
Building wheel for torch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-kmaghkld'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Failed building wheel for torch
Running setup.py clean for torch
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\torch
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore'
----------------------------------------
ERROR: Failed cleaning build dir for torch
Building wheel for pyyaml (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-nztx1z7u'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\
Complete output (59 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.mingw-3.8
creating build\lib.mingw-3.8\yaml
copying lib3\yaml\composer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\constructor.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\cyaml.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\dumper.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\emitter.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\error.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\events.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\loader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\nodes.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\parser.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\reader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\representer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\resolver.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\scanner.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\serializer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\tokens.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\__init__.py -> build\lib.mingw-3.8\yaml
running build_ext
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 291, in <module>
setup(
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 185, in run
_build_ext.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\build_ext.py", line 307, in run
self.compiler = new_compiler(compiler=self.compiler,
File "C:\program files\inkscape\lib\python3.8\distutils\ccompiler.py", line 1034, in new_compiler
return klass(None, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 310, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 127, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Failed building wheel for pyyaml
Running setup.py clean for pyyaml
Failed to build torch pyyaml
Installing collected packages: pyyaml, torch
Running setup.py install for pyyaml ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-v7hld7x2\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\.local\include\python3.8\pyyaml'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\
Complete output (61 lines):
running install
running build
running build_py
creating build
creating build\lib.mingw-3.8
creating build\lib.mingw-3.8\yaml
copying lib3\yaml\composer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\constructor.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\cyaml.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\dumper.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\emitter.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\error.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\events.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\loader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\nodes.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\parser.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\reader.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\representer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\resolver.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\scanner.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\serializer.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\tokens.py -> build\lib.mingw-3.8\yaml
copying lib3\yaml\__init__.py -> build\lib.mingw-3.8\yaml
running build_ext
'gcc' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 291, in <module>
setup(
File "C:\program files\inkscape\lib\python3.8\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\.local\lib\python3.8\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\program files\inkscape\lib\python3.8\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\program files\inkscape\lib\python3.8\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\program files\inkscape\lib\python3.8\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-hw6a8m3j\pyyaml\setup.py", line 185, in run
_build_ext.run(self)
File "C:\program files\inkscape\lib\python3.8\distutils\command\build_ext.py", line 307, in run
self.compiler = new_compiler(compiler=self.compiler,
File "C:\program files\inkscape\lib\python3.8\distutils\ccompiler.py", line 1034, in new_compiler
return klass(None, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 310, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\program files\inkscape\lib\python3.8\distutils\cygwinccompiler.py", line 127, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\inkscape\bin\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-hw6a8m3j\\pyyaml\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-v7hld7x2\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\.local\include\python3.8\pyyaml' Check the logs for full command output.
Thanks in advance for your help.
After following your advice, a new error has popped up:
C:\Users\Owlsoul>pip install torch
Defaulting to user installation because normal site-packages is not writeable
Collecting torch
Using cached torch-0.1.2.post2.tar.gz (128 kB)
Requirement already satisfied: pyyaml in c:\users\owlsoul\appdata\roaming\python\python38\site-packages (from torch) (5.3.1)
Building wheels for collected packages: torch
Building wheel for torch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Owlsoul\AppData\Local\Temp\pip-wheel-iuye_5re'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\
Complete output (30 lines):
running bdist_wheel
running build
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Roaming\Python\Python38\site-packages\wheel\bdist_wheel.py", line 290, in run
self.run_command('build')
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files (x86)\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Failed building wheel for torch
Running setup.py clean for torch
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch
Complete output (2 lines):
running clean
error: [Errno 2] No such file or directory: '.gitignore'
----------------------------------------
ERROR: Failed cleaning build dir for torch
Failed to build torch
Installing collected packages: torch
Running setup.py install for torch ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-z9idl5pc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\AppData\Roaming\Python\Python38\Include\torch'
cwd: C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\
Complete output (23 lines):
running install
running build_deps
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 225, in <module>
setup(name="torch", version="0.1.2.post2",
File "c:\program files (x86)\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\program files (x86)\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 99, in run
self.run_command('build_deps')
File "c:\program files (x86)\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files (x86)\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Owlsoul\AppData\Local\Temp\pip-install-jio16_76\torch\setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\Owlsoul\\AppData\\Local\\Temp\\pip-install-jio16_76\\torch\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Owlsoul\AppData\Local\Temp\pip-record-z9idl5pc\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Owlsoul\AppData\Roaming\Python\Python38\Include\torch' Check the logs for full command output.
Note that your error is caused by c:\program files\inkscape\bin\python.exe, which is almost certainly entirely the wrong python executable, because that's not where python installs itself.
Uninstall whatever you installed, then grab the latest installer from https://www.python.org/downloads/windows/, run that (with admin rights, because hopefully you remembered to make sure your own account is set to a normal account type and NOT an admin account, for obvious security reasons), then when that's finished installing, make sure to update your PATH:
run "advanced system settings"
click the "environment variables" button
double click the PATH entry in "system variables" section
verify that both C:\Program Files\Python38\ and C:\Program Files\Python38\Scripts\ are in there. If not, add them. (or whatever the location is you custom-installed them to of course).
possibly necessary: also check to see if there is an Inkscape entry in your Path. If there is, use the "move up"/"move down" buttons to make sure that the Python entries are listed above the Inkscape entry.
Then you can start cmd/powershell/etc with admin rights (if you already had one open, close it and start a new one for the updated PATH to be in effect) and just use pip (not pip3) to install packages globally.
That said, for projects you almost always want to use python's "virtualenv" concept, explained over on https://docs.python.org/3/tutorial/venv.html, which lets you install dependencies locally, which means that if one project requires, say, Django 2.10 and another requires Djangoo 3.0, each of them installs in their own virtual environment, instead of causing a global dependency conflict.
In the end, I ended up using anaconda and it worked. Thanks a lot, but setting these things up drives me nuts and I may not have the skill to understand a lot of the instructions...
I am running the following python code
import numpy as np
import pydensecrf.densecrf as dcrf
import matplotlib.pyplot as plt
which results in
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-4-cbaa174fb5e7> in <module>
1 import numpy as np
----> 2 import pydensecrf.densecrf as dcrf
3 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'pydensecrf'
I have tried installing: pip install pydensecrf
But whenever I do, i get the following error
C:\Users\Aparajita Das>pip install pydensecrf
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pydensecrf/
Collecting pydensecrf
Using cached pydensecrf-1.0rc3.tar.gz (1.0 MB)
Building wheels for collected packages: pydensecrf
Building wheel for pydensecrf (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\APARAJ~1\AppData\Local\Temp\pip-wheel-v3toa6sn'
cwd: C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\
Complete output (44 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.7\pydensecrf
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\setup.py", line 41, in <module>
"Topic :: Scientific/Engineering :: Artificial Intelligence",
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
self.run_command('build')
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run
_build_ext.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build_ext.py", line 309, in run
force=self.force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Failed building wheel for pydensecrf
Running setup.py clean for pydensecrf
Failed to build pydensecrf
Installing collected packages: pydensecrf
Running setup.py install for pydensecrf ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\APARAJ~1\AppData\Local\Temp\pip-record-tms9_lds\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Aparajita Das\Anaconda3\Include\pydensecrf'
cwd: C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\
Complete output (46 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\utils.py -> build\lib.win-amd64-3.7\pydensecrf
copying pydensecrf\__init__.py -> build\lib.win-amd64-3.7\pydensecrf
running build_ext
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\APARAJ~1\AppData\Local\Temp\pip-install-pqhh72by\pydensecrf\setup.py", line 41, in <module>
"Topic :: Scientific/Engineering :: Artificial Intelligence",
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Aparajita Das\Anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 87, in run
_build_ext.run(self)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\command\build_ext.py", line 309, in run
force=self.force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
return klass(None, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 285, in __init__
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
File "C:\Users\Aparajita Das\Anaconda3\lib\distutils\cygwinccompiler.py", line 129, in __init__
if self.ld_version >= "2.10.90":
TypeError: '>=' not supported between instances of 'NoneType' and 'str'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"'; __file__='"'"'C:\\Users\\APARAJ~1\\AppData\\Local\\Temp\\pip-install-pqhh72by\\pydensecrf\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\APARAJ~1\AppData\Local\Temp\pip-record-tms9_lds\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Aparajita Das\Anaconda3\Include\pydensecrf' Check the logs for full command output.
I am using Python 3.7.3 and I have cpython installed. I have checked everywhere and no solution is working for me. I have tried downgrading python, thinking it might work for older version using the following but it does not even downgrade it to the given version.
conda install python=3.5.0
How do I solve this?
For me installation failed with error: command 'gcc' failed with exit status 1.
This worked for me:
pip install cython
pip install git+https://github.com/lucasb-eyer/pydensecrf.git
Installing cython is the first thing you need to try out.That alone didn't work for me.Combination of both worked like a charm.
Referred to the comments at https://github.com/lucasb-eyer/pydensecrf/issues/78
Step1: download package of pydensecrf compatible with python version from link https://anaconda.org/conda-forge/pydensecrf/files?version=1.0rc2&page=2
Step2: Extract the package and copy two subfolders "pydensecrf and pydensecrf-1.0rc2.dist-info" in folder "Lib" to installed folder of python (Example: C:\Python 3.6\Lib\site-packages)
I got lief working just fine on my Desktop (windows), but it refuses to install on my MacBook. I'm newer to Python development and installing new libraries, so maybe there's something I'm missing. I have Python 3.6 and 3.7 on my machine (is that a possible issue?). Lief appears to have support for Python 3.6, but I can't seem to install it using "pip install lief" or "pip3 install lief". I've updated setuptools but that doesn't seem to make any difference, either.
Terminal:
[Bens-MacBook-Pro-2:Downloads bluchterhand$ pip3 install lief
Collecting lief
Using cached https://files.pythonhosted.org/packages/cd/0e/0d6f3357975dd1530aeb4b4a84a99d493775391758378fb5109f47b613f9/lief-0.9.0.zip
Building wheels for collected packages: lief
Building wheel for lief (setup.py) ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/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 /private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-wheel-mme5acjc --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/lief
copying lief/__init__.py -> build/lib.macosx-10.6-intel-3.6/lief
running build_ext
Url: https://github.com/lief-project/LIEF/releases/download/0.9.0/lief-0.9.0-py3.6-osx.egg
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 285, in <module>
'sdist': lief_sdist
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 192, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 215, in build_extension
self._install_from_source_package()
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 265, in _install_from_source_package
raise Exception("Unable to find {}".format(url))
Exception: Unable to find /Users/bluchterhand/lief-0.9.0-py3.6-osx.egg
----------------------------------------
Failed building wheel for lief
Running setup.py clean for lief
Failed to build lief
Installing collected packages: lief
Running setup.py install for lief ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-record-g3smg09m/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/lief
copying lief/__init__.py -> build/lib.macosx-10.6-intel-3.6/lief
running build_ext
Url: https://github.com/lief-project/LIEF/releases/download/0.9.0/lief-0.9.0-py3.6-osx.egg
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 285, in <module>
'sdist': lief_sdist
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 78, in run
_build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 215, in build_extension
self._install_from_source_package()
File "/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py", line 265, in _install_from_source_package
raise Exception("Unable to find {}".format(url))
Exception: Unable to find /Users/bluchterhand/lief-0.9.0-py3.6-osx.egg
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-record-g3smg09m/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/hp/ggfhzr7n133cr3csm59kdvs80000gn/T/pip-install-g3m0_dgi/lief/
Most notably; it fails to build the wheel. I've installed wheel many times thinking the install might've been broken, but I don't think that's the case anymore. Anyone have any ideas?
As with everything I ever post to this site, I found a solution to the problem the moment I posted. I downloaded the egg file from github.com/lief-project/LIEF/releases and pasted it in the /Users/NAME directory... all good. Gonna leave this up for anyone else having similar issues...
I already have dlib 19.1.0 and open cv 3.4.5 and numpy,scipy packages with advanced version but by using
pip install face_recognition
im getting following errors..Please can anyone help me what i did wrongly..
Collecting face_recognition
Using cached https://files.pythonhosted.org/packages/3f/ed/ad9a28042f373d4633fc8b49109b623597d6f193d3bbbef7780a5ee8eef2/face_recognition-1.2.3-py2.py3-none-any.whl
Requirement already satisfied: numpy in c:\python35\lib\site-packages (from face_recognition) (1.15.4)
Collecting dlib>=19.7 (from face_recognition)
Using cached https://files.pythonhosted.org/packages/35/8d/e4ddf60452e2fb1ce3164f774e68968b3f110f1cb4cd353235d56875799e/dlib-19.16.0.tar.gz
Collecting face-recognition-models>=0.3.0 (from face_recognition)
Requirement already satisfied: Click>=6.0 in c:\python35\lib\site-packages (from face_recognition) (7.0)
Requirement already satisfied: Pillow in c:\python35\lib\site-packages (from face_recognition) (5.4.1)
Building wheels for collected packages: dlib
Running setup.py bdist_wheel for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Admin\AppData\Local\Temp\pip-wheel-de03y7mf --python-tag cp35:
running bdist_wheel
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\wheel\bdist_wheel.py", line 188, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1
----------------------------------------
Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib, face-recognition-models, face-recognition
Found existing installation: dlib 19.1.0
Uninstalling dlib-19.1.0:
Successfully uninstalled dlib-19.1.0
Running setup.py install for dlib ... error
Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Admin\AppData\Local\Temp\pip-record-tjyw2jml\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Traceback (most recent call last):
File "c:\python35\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\python35\Scripts\cmake.exe\__main__.py", line 5, in <module>
ImportError: cannot import name 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 257, in <module>
'Topic :: Software Development',
File "c:\python35\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python35\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python35\lib\distutils\command\install.py", line 539, in run
self.run_command('build')
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\python35\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python35\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python35\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 127, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\setup.py", line 118, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python35\lib\subprocess.py", line 626, in check_output
**kwargs).stdout
File "c:\python35\lib\subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1
----------------------------------------
Rolling back uninstall of dlib
Command "c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-rqlch36v\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Admin\AppData\Local\Temp\pip-record-tjyw2jml\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Admin\AppData\Local\Temp\pip-install-rqlch36v\dlib\
Actually i tried with some other installation keywords and tried to rectified error but 'm getting same errors when i used pip install face_recognition and my python version is 3.5.2 and i tried with wheel files also with specified version of python and face_recognition.
Following wheel files are i have tried wheel files..
https://pypi.org/simple/face-recognition/
Hello for this problem make this
step 1:
pip install cmake dlib
step 2:
pip install face-recognition
If you have the problem by dlib check this
sudo apt install python3-dev