Installing a library some code without installing visual studio in pycharm
2 hours ago, Symbolls said:So i want to install a library caled face_recognition but i have this error with tells me to get visualt studio ( i am using pycharm btw) is there a very similar library and or a way to bypass this and get the files installed?
(venv) C:\Users\symbo\PycharmProjects\pythonProject2>pip3 install face_recognition
Collecting face_recognition
Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)
Collecting dlib>=19.7
Using cached dlib-19.21.1.tar.gz (3.6 MB)
Requirement already satisfied: numpy in c:\users\symbo\pycharmprojects\pythonproject2\venv\lib\site-packages (from face_recognition) (1.19.5)
Collecting Click>=6.0
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Requirement already satisfied: Pillow in c:\users\symbo\pycharmprojects\pythonproject2\venv\lib\site-packages (from face_recognition) (8.1.0)
Collecting face-recognition-models>=0.3.0
Using cached face_recognition_models-0.3.0.tar.gz (100.1 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Using legacy 'setup.py install' for face-recognition-models, since package 'wheel' is not installed.
Installing collected packages: face-recognition-models, dlib, Click, face-recognition
Running setup.py install for face-recognition-models ... done
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\symbo\pycharmprojects\pythonproject2\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb4
41bcba5412\\setup.py'"'"'; __file__='"'"'C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\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\symbo\AppData\Local\Temp\pip-record-wgoawilb\install-record.txt' --single-version-externally-managed --compile --install-heade
rs 'c:\users\symbo\pycharmprojects\pythonproject2\venv\include\site\python3.9\dlib'
cwd: C:\Users\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\
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.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e30
3740f6dd240dcaf0cb441bcba5412\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=c:\users\symbo\pycharmprojects\pythonproject2\venv\scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\symbo\AppData\Local\Temp\pip-install-_d37
r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\build\lib.win-amd64-3.9 -A x64'
-- 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\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\setup.py", line 223, in <module>
setup(
File "c:\users\symbo\pycharmprojects\pythonproject2\venv\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\symbo\pycharmprojects\pythonproject2\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\command\install.py", line 546, in run
self.run_command('build')
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\symbo\AppData\Local\Temp\pip-install-_d37r51s\dlib_e303740f6dd240dcaf0cb441bcba5412\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\symbo\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\symbo\\AppData\\Lo
cal\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\build\\lib.win-amd64-3.9', '-DPYTHON_EXECUTABLE=c:\\users\\symbo\\pycharmprojects\\pythonproject2\\venv\\scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RE
LEASE=C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\build\\lib.win-amd64-3.9', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\symbo\pycharmprojects\pythonproject2\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37
r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\setup.py'"'"'; __file__='"'"'C:\\Users\\symbo\\AppData\\Local\\Temp\\pip-install-_d37r51s\\dlib_e303740f6dd240dcaf0cb441bcba5412\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__fi
le__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\symbo\AppData\Local\Temp\pip-record-wgoawilb\install-record.txt' --single-version-externally-
managed --compile --install-headers 'c:\users\symbo\pycharmprojects\pythonproject2\venv\include\site\python3.9\dlib' Check the logs for full command output.
i acsualy find uout a way to do it meanwaile and it has been working flowlesly if you have evrithing reqwierd installed
link: (https://www.codegrepper.com/code-examples/delphi/install+face_recognition+pycharm)
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now