Iam trying to install torch package through command prompt but I keep getting this error
R: Command errored out with exit status 1: command: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\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\kaisios\AppData\Local\Temp\pip-wheel-9mgn8ll8' --python-tag cp37
cwd: C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\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\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "C:\Users\kaisios\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\kaisios\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line 192, in run
self.run_command('build')
File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name) File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\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:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\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\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\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, torchvision
Running setup.py install for torch ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\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\kaisios\AppData\Local\Temp\pip-record-di7tzuhu\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\ Complete output (23 lines): running install running build_deps Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 265, in <module>
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "C:\Users\kaisios\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\kaisios\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\torch\setup.py", line 99, in run
self.run_command('build_deps')
File "C:\Users\kaisios\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\kaisios\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\kaisios\AppData\Local\Temp\pip-install-qoiahbzi\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:\Users\kaisios\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\torch\\setup.py'"'"'; __file__='"'"'C:\\Users\\kaisios\\AppData\\Local\\Temp\\pip-install-qoiahbzi\\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\kaisios\AppData\Local\Temp\pip-record-di7tzuhu\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
please help to solve the problem
Related
This question already has answers here:
An error occurred while installing face_recognition Error text: Collecting face_recognition
(5 answers)
Closed 2 years ago.
I have a problem when trying to install the face_recognition module using the commandprompt, I used pip install face_recognition, but I get a error and I can't resolve it myself. Anyone who can help?
I installed python through Microsoft studios (Python 3.8).
My pip version is 20.2.1
I also tried pip install face_recognition=1.3.0
My error is right here:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\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\Bruger\AppData\Local\Temp\pip-record-w68bakhl\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Bruger\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib'
cwd: C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\
Complete output (55 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
Traceback (most recent call last):
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 223, in <module>
setup(
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\__init__.py", line 165, in setup
return distutils.core.setup(**attrs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Bruger\AppData\Local\Temp\pip-install-hoq7h4eo\dlib\setup.py", line 122, in get_cmake_version
raise RuntimeError("\n*******************************************************************\n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: _dlib_pybind11
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Bruger\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Bruger\\AppData\\Local\\Temp\\pip-install-hoq7h4eo\\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\Bruger\AppData\Local\Temp\pip-record-w68bakhl\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\Bruger\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Include\dlib' Check the logs for full command output.
Looks like you're missing a library that's required to build your dependencies.
CMake must be installed to build the following extensions: _dlib_pybind11
Install CMake and try installing face_recognition again.
It looks like you don't have the required Libraries
Run pip install cmake , and then pip install dlib. I guess now you will no longer receive the error...
This will install the requirements.
I'm trying to install pythonnet via pip install pythonnet but accord error shown here:
Collecting pythonnet
Using cached pythonnet-2.4.0.tar.gz (1.8 MB)
Building wheels for collected packages: pythonnet
Building wheel for pythonnet (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/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-ig8_5h8m
cwd: /tmp/pip-install-jcvixpk5/pythonnet/
Complete output (43 lines):
running bdist_wheel
running build
running build_ext
/bin/sh: mono: command not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 658, in <module>
zip_safe=False,
File "/home/paziresh/virtualenv/paziresh365/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 161, in setup
return distutils.core.setup(**attrs)
File "/opt/alt/python36/lib64/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 610, in run
return bdist_wheel.bdist_wheel.run(self)
File "/home/paziresh/virtualenv/paziresh365/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 223, in run
self.run_command('build')
File "/opt/alt/python36/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/alt/python36/lib64/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/opt/alt/python36/lib64/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 245, in build_extension
self._install_packages()
File "/tmp/pip-install-jcvixpk5/pythonnet/setup.py", line 424, in _install_packages
subprocess.check_call(cmd, shell=use_shell)
File "/opt/alt/python36/lib64/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mono tools/nuget/nuget.exe update -self' returned non-zero exit status 127.
----------------------------------------
ERROR: Failed building wheel for pythonnet
Running setup.py clean for pythonnet
Failed to build pythonnet
Installing collected packages: pythonnet
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1:
command: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/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-uuxxm05w/install-record.txt --single-version-externally-managed --compile --install-headers /home/paziresh/virtualenv/paziresh365/3.6/include/site/python3.6/pythonnet
cwd: /tmp/pip-install-jcvixpk5/pythonnet/
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
ERROR: Command errored out with exit status 1: /home/paziresh/virtualenv/paziresh365/3.6/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jcvixpk5/pythonnet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jcvixpk5/pythonnet/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-uuxxm05w/install-record.txt --single-version-externally-managed --compile --install-headers /home/paziresh/virtualenv/paziresh365/3.6/include/site/python3.6/pythonnet Check the logs for full command output.
made some searches and found required libs are wheel, setuptools and scons.so all of them are installed and updated. but nothing changed!
any new idea about that?
I'm using python 3.6.8 and Linux
i have used every solution that i can find in the internet but i am unable to install dlib in vs code please help me
pip install dlib --user
Collecting dlib
Using cached https://files.pythonhosted.org/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\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\abhigna reddy\AppData\Local\Temp\pip-record-dpfk1_ko\install-record.txt' --single-version-externally-managed --compile --user --prefix=
cwd: C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\
Complete output (57 lines):
running install
running build
running build_py
package init file 'dlib\__init__.py' not found (or not a regular file)
running build_ext
Building extension for Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\program files\python38\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\build\lib.win-amd64-3.8 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:3 (project):
Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Users/abhigna reddy/AppData/Local/Temp/pip-install-b3pu5qni/dlib/build/temp.win-amd64-3.8/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\setup.py", line 223, in <module>
setup(
File "c:\program files\python38\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\program files\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\program files\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python38\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\program files\python38\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\program files\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\program files\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\program files\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\abhigna reddy\AppData\Local\Temp\pip-install-b3pu5qni\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\program files\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\dlib\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\program files\\python38\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\dlib\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\abhigna reddy\\AppData\\Local\\Temp\\pip-install-b3pu5qni\\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\abhigna reddy\AppData\Local\Temp\pip-record-dpfk1_ko\install-record.txt' --single-version-externally-managed --compile --user --prefix= Check the logs for full command output.
you can install dlib for python 3.6
create a virtual environment for python 3.6
within virutualenv you can run below command
python -m pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
C:\python\Scripts>pip install dlib
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\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\Work\AppData\Local\Temp\pip-record-alg_6b9y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\dlib'
cwd: C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\
Complete output (47 lines):
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:\python\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\python\Scripts\cmake.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'cmake'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 223, in <module>
setup(
File "c:\python\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\python\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\python\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\Work\AppData\Local\Temp\pip-install-m0sdf_bv\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "c:\python\lib\subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "c:\python\lib\subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--version']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Work\\AppData\\Local\\Temp\\pip-install-m0sdf_bv\\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\Work\AppData\Local\Temp\pip-record-alg_6b9y\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python\Include\dlib' Check the logs for full command output.
This is the error that comes when i run pip install dlib
When I run pip install pdfminer using Python 2.7 on Windows Server 2012, I got the following error :
Running setup.py install for pdfminer ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\setup.py'"'"'; __file__='"'"'c:\\users\\admin
i~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\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\admini~1\appdata\local\temp\2\pip-record-mdl997\install-record.txt' --single-version-externally-managed --compile
cwd: c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\
Complete output (24 lines):
running install
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\setup.py", line 71, in <module>
'Topic :: Text Processing',
File "c:\python27\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\users\admini~1\appdata\local\temp\2\pip-install-xgbxsi\pdfminer\setup.py", line 11, in run
from pdfminer.cmapdb import convert_cmap
File "pdfminer\cmapdb.py", line 22, in <module>
from .psparser import PSStackParser
File "pdfminer\psparser.py", line 4, in <module>
from .utils import choplist
File "pdfminer\utils.py", line 219, in <module>
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
File "pdfminer\utils.py", line 187, in <genexpr>
PDFDocEncoding = ''.join(chr(x) for x in (
ValueError: chr() arg not in range(256)
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\setup.py'"'"
'; __file__='"'"'c:\\users\\admini~1\\appdata\\local\\temp\\2\\pip-install-xgbxsi\\pdfminer\\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\admini~1\appdata\local\temp\2\pip-record-mdl997\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
This used to work ... and I have no clue on how to fix that.
Recently pdfminer dropped the support for Python 2.
You can try using pdfminer.six, this is a fork of pdfminer that it supports both Python 2 and 3. However, the support for Python 2 will be dropped at January, 2020, so it will only buy you a few months.
Full disclosure: I am one of the maintainers of pdfminer.six.