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
Related
pip install dlib
Collecting dlib
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
Running setup.py install for dlib ... error
I just simply wanted to download dlib after cmake.
I've downloaded cmake and tried dlib...
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\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\USER\AppData\Local\Temp\pip-record-avg12uez\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python38-32\Include\dlib'
cwd: C:\Users\USER\AppData\Local\Temp\pip-install-8yznfpzx\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\USER\AppData\Local\Temp\pip-install-8yznfpzx\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\USER\AppData\Local\Temp\pip-install-8yznfpzx\dlib\build\lib.win32-3.8 -DPYTHON_EXECUTABLE=c:\users\user\appdata\local\programs\python\python38-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\USER\AppData\Local\Temp\pip-install-8yznfpzx\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\USER\AppData\Local\Temp\pip-install-8yznfpzx\dlib\setup.py", line 223, in <module>
setup(
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\user\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\user\appdata\local\programs\python\python38-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\USER\AppData\Local\Temp\pip-install-8yznfpzx\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\USER\AppData\Local\Temp\pip-install-8yznfpzx\dlib\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\dlib\\build\\lib.win32-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\user\\appdata\\local\\programs\\python\\python38-32\\python.exe',
'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\dlib\\build\\lib.win32-3.8']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\USER\\AppData\\Local\\Temp\\pip-install-8yznfpzx\\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\USER\AppData\Local\Temp\pip-record-avg12uez\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\user\appdata\local\programs\python\python38-32\Include\dlib' Check the logs for full command output.
checked here a bit and saw a solution actually: https://stackoverflow.com/a/63648302/13692454
But here is new problem, I am using VS code and even if I download C++ extentions, it doesn't fix. I have no idea to what to do. How can i fix this? Thanks in advance*
Just used google colab to fix this problem. Can't find a solution for VS code...
Following a YouTube video about face recognition, I installed Python 3.8.2, then CMAKE, and then dlib. The dlib failed with the following message. At first I had python 32 bits, then I removed it and installed the 64 bit version, with same problem. Any idea?
I did the same flow on a another computer, with a similar error, that was solved after installing CMake. In this case CMake is installed.
What did I miss?
C:\Users\NH5>pip install dlib
Defaulting to user installation because normal site-packages is not writeable
Collecting dlib
Using cached dlib-19.19.0.tar.gz (3.2 MB)
Could not build wheels for dlib, since package 'wheel' is not installed.
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\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\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\NH5\AppData\Local\Temp\pip-record-wm_xgg14\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NH5\AppData\Roaming\Python\Python38\Include\dlib'
cwd: C:\Users\NH5\AppData\Local\Temp\pip-install-7c571567\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\NH5\AppData\Local\Temp\pip-install-7c571567\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\NH5\AppData\Local\Temp\pip-install-7c571567\dlib\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\program files\python38\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\NH5\AppData\Local\Temp\pip-install-7c571567\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/NH5/AppData/Local/Temp/pip-install-7c571567/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\NH5\AppData\Local\Temp\pip-install-7c571567\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\NH5\AppData\Local\Temp\pip-install-7c571567\dlib\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\NH5\AppData\Local\Temp\pip-install-7c571567\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\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\program files\\python38\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\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\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\NH5\\AppData\\Local\\Temp\\pip-install-7c571567\\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\NH5\AppData\Local\Temp\pip-record-wm_xgg14\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\NH5\AppData\Roaming\Python\Python38\Include\dlib' Check the logs for full command output.
C:\Users\NH5>
Try deepface. It is OS independent.
#!pip install deepface
from deepface import DeepFace
#face verification
obj = DeepFace.verify("img1.jpg", "img2.jpg")
#face recognition
df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db")
Find function looks for the identity of img1.jpg in my_db folder.
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
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
I can't install python net everything in previous solutions I have followed through and it still doesn't work.
I have tried everything. Do I need to uninstall python and do it again?
pip install pyhtonnet
ERROR: Could not find a version that satisfies the requirement pyhtonnet (from versions: none)
ERROR: No matching distribution found for pyhtonnet
C:\Users\vishv>pip install pythonnet
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: 'c:\users\vishv\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py'"'"'; file='"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\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 'C:\Users\vishv\AppData\Local\Temp\pip-wheel-qw1gpb32'
cwd: C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet
Complete output (69 lines):
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.1.0.
Updating NuGet.exe to 5.4.0.
Update successful.
Cannot find the specified version of msbuild: '14'
MSBuild auto-detection: using msbuild version '4.0' from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319'.
Restoring NuGet package NUnit.3.7.1.
Restoring NuGet package NUnit.ConsoleRunner.3.7.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Adding package 'NUnit.ConsoleRunner.3.7.0' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
Adding package 'NUnit.3.7.1' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
Adding package 'UnmanagedExports.1.2.7' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
Added package 'UnmanagedExports.1.2.7' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
Added package 'NUnit.ConsoleRunner.3.7.0' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
Added package 'NUnit.3.7.1' to folder 'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\packages'
NuGet Config files used:
C:\Users\vishv\AppData\Roaming\NuGet\NuGet.Config
Feeds used:
C:\Users\vishv.nuget\packages
https://api.nuget.org/v3/index.json
Installed:
3 package(s) to packages.config projects
Traceback (most recent call last):
File "tools\geninterop\geninterop.py", line 24, in
from pycparser import c_ast, c_parser
ModuleNotFoundError: No module named 'pycparser'
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py", line 623, in
setup(
File "c:\users\vishv\appdata\local\programs\python\python38\lib\site-packages\setuptools_init_.py", line 144, in setup
return distutils.core.setup(**attrs)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py", line 610, in run
return bdist_wheel.bdist_wheel.run(self)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\site-packages\wheel\bdist_wheel.py", line 223, in run
self.run_command('build')
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 340, in run
self.build_extensions()
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "c:\users\vishv\appdata\local\programs\python\python38\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py", line 298, in build_extension
subprocess.check_call([sys.executable, geninterop, interop_file])
File "c:\users\vishv\appdata\local\programs\python\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\users\vishv\appdata\local\programs\python\python38\python.exe', 'tools\geninterop\geninterop.py', 'src\runtime\interop38.cs']' returned non-zero exit status 1.
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: 'c:\users\vishv\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py'"'"'; file='"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\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 'C:\Users\vishv\AppData\Local\Temp\pip-record-h9hrt2n6\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\vishv\appdata\local\programs\python\python38\Include\pythonnet'
cwd: C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\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: 'c:\users\vishv\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\pythonnet\setup.py'"'"'; file='"'"'C:\Users\vishv\AppData\Local\Temp\pip-install-pwmwkrlc\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 'C:\Users\vishv\AppData\Local\Temp\pip-record-h9hrt2n6\install-record.txt' --single-version-externally-managed --compile --install-headers
Have you tried installing python 3.7 instead of 3.8? I just ran into a similar error with 3.8 but no problems with 3.7 (and upgraded pip and setuptools). Seems like 3.8. will only work with pythonnet version >= 2.5