Not able to install face_recognition module in pyton - python-3.6

I have python 3.6 installed on my windows 10 when I tried to install the face_recognition module for python I got the following error
it gives me the error when pip tried to install dlib
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib, Click, face-recognition
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\acer\appdata\local\programs\python\python36-32\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\setup.py'"'"'; __file__='"'"'C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\acer\AppData\Local\Temp\pip-record-3ig35xio\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\acer\appdata\local\programs\python\python36-32\Include\dlib'
cwd: C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\
Complete output (59 lines):
running install
c:\users\acer\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
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.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=c:\users\acer\appdata\local\programs\python\python36-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\build\lib.win32-3.6'
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:14 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/Users/acer/AppData/Local/Temp/pip-install-cljzfpu6/dlib_351488587aea427493530fa6c8e1bf03/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/acer/AppData/Local/Temp/pip-install-cljzfpu6/dlib_351488587aea427493530fa6c8e1bf03/build/temp.win32-3.6/Release/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\setup.py", line 261, in <module>
'Topic :: Software Development',
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\__init__.py", line 159, in setup
return distutils.core.setup(**attrs)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\install.py", line 68, in run
return orig.install.run(self)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\acer\AppData\Local\Temp\pip-install-cljzfpu6\dlib_351488587aea427493530fa6c8e1bf03\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\acer\appdata\local\programs\python\python36-32\lib\subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\build\\lib.win32-3.6', '-DPYTHON_EXECUTABLE=c:\\users\\acer\\appdata\\local\\programs\\python\\python36-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\build\\lib.win32-3.6']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\acer\appdata\local\programs\python\python36-32\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\setup.py'"'"'; __file__='"'"'C:\\Users\\acer\\AppData\\Local\\Temp\\pip-install-cljzfpu6\\dlib_351488587aea427493530fa6c8e1bf03\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\acer\AppData\Local\Temp\pip-record-3ig35xio\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\acer\appdata\local\programs\python\python36-32\Include\dlib' Check the logs for full command output
I tried all possible methods to solve this error
by my self
plz help me out of this error

Related

KeyError: 'arm64' in pyenv using nodeenv to install node 16.19.0

Attempting to install dependencies for the kolibri open source environment using pyenv and python virtualenv. Successfully installed python 3.9.9 and attempting to install node and yarn using nodeenv but continue running into this log for any attempt:
(kolibri-py3.9) aleesmith#myMB kolibri % nodeenv --python-virtualenv --node 16.19.0
* Install prebuilt node (16.19.0) Traceback (most recent call last):
File "/Users/aleesmith/.pyenv/versions/kolibri-py3.9/bin/nodeenv", line 33, in <module>
sys.exit(load_entry_point('nodeenv==1.3.3', 'console_scripts', 'nodeenv')())
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 1076, in main
create_environment(env_dir, opt)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 905, in create_environment
install_node(env_dir, src_dir, opt)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 686, in install_node
node_url = get_node_bin_url(opt.node)
File "/Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages/nodeenv.py", line 512, in get_node_bin_url
'arch': archmap[platform.machine()],
KeyError: 'arm64'
I am using an M1 MacBook Air using 13.1 (22C65) OS and wondering if that contributes to the issue
I made sure that nodeenv was properly installed and was met with
Requirement already satisfied: nodeenv in /Users/aleesmith/.pyenv/versions/3.9.9/envs/kolibri-py3.9/lib/python3.9/site-packages (1.3.3)
indicating that it's already installed.

Jupyter Notebook: Kernel Error on the Right

I have just installed Anaconda and run Jupyter Notebook through command line by using jupyter notebook command. However, I am facing an issue. On the top right, I see Kernel Error.
When I click on Kernel Error, I see these lines:
Traceback (most recent call last):
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernel
km.start_kernel(**kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 301, in start_kernel
kernel_cmd, kw = self.pre_start_kernel(**kw)
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 248, in pre_start_kernel
self.write_connection_file()
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 474, in write_connection_file
kernel_name=self.kernel_name
File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 138, in write_connection_file
with secure_write(fname) as f:
File "C:\ProgramData\Anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 424, in secure_write
win32_restrict_file_to_user(fname)
File "C:\Users\Shawn\AppData\Roaming\Python\Python37\site-packages\jupyter_core\paths.py", line 359, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed: %1 is not a valid Win32 application.
I can't run any Python code on Jupyter Notebook, as I am continuing to get that error.
I have gone through numerous threads on Stack Overflow for several hours. But I can't fix the issue.
Please, help me to solve the issue. I am doing a course on Data Scince with Python. I can't move forward without fixing this issue.
Update 1:
I have visited this Github thread and tried using the following command:
conda install -c conda-forge pywin32
conda install -c anaconda jupyter_client
conda install -c conda-forge jupyter_core
pip install --upgrade pywin32==224
However, the issue is not fixed. Instead, I am getting a new error,
ImportError: DLL load failed: The specified procedure could not be found.
This is really frustrating!
try this way, i fixed my jupyter.
same error site-packages\tornado
command
jupyter kernelspec list
from the shown result
Available kernels:
python3 D:\Programs\Anaconda3\share\jupyter\kernels\python3
open the folder, and edit kernel.json
{
"argv": [
"D:\\Programs\\Anaconda3\\python.exe", //change to your correct path
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
restart jupyter, and it will be ok.
Did you try opening the anaconda navigator from terminal and then create an environment their and install the jupyter notebook in that environment and then open the jupyter notebook from the navigator
Alright. I have managed to fix the issue. I have to write these commands:
conda install -c conda-forge pywin32
conda install -c anaconda jupyter_client
conda install -c conda-forge jupyter_core
pip install --upgrade pywin32==224
Then I got an error.
import win32api pywin32
ImportError: DLL load failed: The specified procedure could not be found.
I solve the issue by writing this command that I got from this github thread:
conda install pywin32
Now, the issue has been completely fixed!

Pipenv error when trying to install to virtualenv

I'm trying to setup piping to output a pipfile for my employer. I'm totally new to this, and my system knowledge is lacking. Please can someone help me debug this error?
When I run :
pipenv install -e
I get the following error :
(py3) ➜ ~ git:(master) ✗ pipenv install -e
Creating a virtualenv for this project...
Pipfile: /Users/davidmellor/Pipfile
Using /Users/davidmellor/anaconda/envs/py3/bin/python (3.6.2) to create virtualenv...
⠋Already using interpreter /Users/davidmellor/anaconda/envs/py3/bin/python
Using base prefix '/Users/davidmellor/anaconda/envs/py3'
New python executable in /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python
dyld: Library not loaded: #rpath/libpython3.6m.dylib
Referenced from: /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python
Reason: image not found
ERROR: The executable /Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/davidmellor' (should be '/Users/davidmellor/.local/share/virtualenvs/davidmellor-1NR562gx')
ERROR: virtualenv is not compatible with this system or executable
Virtualenv location:
Creating a Pipfile for this project...
Traceback (most recent call last):
File "/Users/davidmellor/anaconda/envs/py3/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 1759, in do_install
pypi_mirror=pypi_mirror,
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 639, in ensure_project
ensure_pipfile(validate=validate, skip_requirements=skip_requirements, system=system)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 288, in ensure_pipfile
project.create_pipfile(python=python)
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/project.py", line 607, in create_pipfile
required_python = self.which('python')
File "/Users/davidmellor/.local/lib/python3.6/site-packages/pipenv/core.py", line 115, in which
p = os.path.join(location, 'bin', command)
File "/Users/davidmellor/anaconda/envs/py3/lib/python3.6/posixpath.py", line 78, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
I've tried to modify my PATH within my .bashrc file as follows :
PYTHON_BIN_PATH="$/Users/davidmellor/.local/bin"
PATH="$PATH:$PYTHON_BIN_PATH"
export PATH=$HOME/.composer/vendor/bin
export DJANGO_SETTINGS_MODULE=blog.settings
But still having no luck.
Thank you so much.
Try using 'pyenv' package with pipenv.
Install 'pyenv' package by using brew install pyenv (if you don't have it).
Install python 3.6.2 using pyenv install 3.6.2. In your case you are using anaconda, so you can also install any anaconda version you would like to use.
Use pyenv install --list to see the list of python available versions
Then, export new installed python version to PATH
export PATH=${PYENV_PYTHON_VERSIONS_HOME}/3.6.2/bin
Now in 'Piplock' specify the same version.
[requires]
python_version = "3.6.2"
Finally, run remove previous virtualenv and rebuild again.
pipenv --rm
pipenv install --dev.

liberasurecode has deprecating version when install swift-all-in-one

I was install openstack swift-all-in-one on my virtual mechine with system Ubuntu Destop 14.04.
It told me that my liberausercode has deprecating version that I need to upgrade when I excute '$HOME/swift/.unittests' in terminal. But the question is how can I upgrade it.
Here is the response:
liberasurecode[11645]: liberasurecode_backend_open: dynamic linking error libJerasure.so.2: cannot open shared object file: No such file or directory
ERROR: Failure: MissingSectionHeaderError (File contains no section headers. file: /etc/swift/swift.confg, line: 1 ' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n')
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
raise MissingSectionHeaderError(fpname, lineno, line)
MissingSectionHeaderError: File contains no section headers.
file: /etc/swift/swift.confg, line: 1
' cd $HOME/swift/doc; sudo cp -r saio/swift /etc/swift; cd -\n'
pyeclib: WARNING: DEPRECATED WARNING: your liberasurecode 1.0.9 will be deprecated in the near future because of the issue https://bugs.launchpad.net/swift/+bug/1639691; Please upgrade to >=1.3.1 and rebuild pyeclib to suppress this message
--------------------- >> end captured logging << ---------------------
FAILED (errors=1)
/root
On websit : https://github.com/openstack/liberasurecode, I find the answer how to update the library.

Error in DjangoCMS setup

I installed DjangoCMS using pip but when I try to launch:
djangocms -p . myapp
to create a new project with DjangoCMS and I answer all the setup questions I get this error:
Command /home/b.esque/Escritorio/eb/bin/python -c "import setuptools,
tokenize;file='/home/b.esque/Escritorio/eb/build/Pillow/setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record /tmp/pip-hYUC5s-record/install-record.txt
--single-version-externally-managed --compile --install-headers /home/b.esque/Escritorio/eb/include/site/python2.7 failed with error
code 1 in /home/b.esque/Escritorio/eb/build/Pillow Traceback (most
recent call last): File "/home/b.esque/Escritorio/eb/bin/djangocms",
line 9, in
load_entry_point('djangocms-installer==0.5.0', 'console_scripts', 'djangocms')() File
"/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/djangocms_installer/main.py",
line 25, in execute
install.requirements(config_data.requirements) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/djangocms_installer/install/init.py",
line 64, in requirements
exit_status = pip.main(args) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/pip/init.py",
line 185, in main
return command.main(cmd_args) File "/home/b.esque/Escritorio/eb/local/lib/python2.7/site-packages/pip/basecommand.py",
line 161, in main
text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)
I'm using Ubuntu 12.0.4. Any ideas on how to solve this?
The problem is with pillow and python headers.
sudo apt-get install python-dev
pip install pillow
After this follow this intructions if you get this error:
EnvironmentError: Pillow is not compiled with JPEG support, see 'Libraries installation issues' documentation section.
Getting error while running django-cms demo page

Resources