I cant install dlib using pip. what is the problem? - pip

ERROR: Command errored out with exit status 1: command:
'C:\Users\dell\Anaconda3\python.exe' -u -c 'import sys, setuptools,
tokenize; sys.argv[0] =
'"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"';
file='"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
bdist_wheel -d 'C:\Users\dell\AppData\Local\Temp\pip-wheel-nd2ljdx5'
--python-tag cp37
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\ Complete
output (53 lines): running bdist_wheel running build running
build_py package init file 'dlib__init__.py' not found (or not a
regular file) running build_ext Traceback (most recent call last):
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py",
line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo) 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 "", line 1, in
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py",
line 261, in
'Topic :: Software Development',
File "C:\Users\dell\Anaconda3\lib\site-packages\setuptools__init__.py",
line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\dell\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Anaconda3\lib\site-packages\wheel\bdist_wheel.py", line
192, in run
self.run_command('build')
File "C:\Users\dell\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\dell\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py",
line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py",
line 125, in get_cmake_version
"\n*******************************************************************\n") RuntimeError:
CMake must be installed to build the following extensions: dlib
ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\dell\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"';
file='"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-8fa9q7wn\install-record.txt'
--single-version-externally-managed --compile
cwd: C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\
Complete output (55 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:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 395, in check_output
**kwargs).stdout
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 775, in init
restore_signals, start_new_session)
File "C:\Users\dell\Anaconda3\lib\subprocess.py", line 1178, in _execute_child
startupinfo)
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\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py", line 261, in <module>
'Topic :: Software Development',
File "C:\Users\dell\Anaconda3\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "C:\Users\dell\Anaconda3\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Users\dell\Anaconda3\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "C:\Users\dell\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\Anaconda3\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\dell\Anaconda3\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Users\dell\Anaconda3\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py", line 125, in get_cmake_version
"\n*******************************************************************\n")
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\dell\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"'; file='"'"'C:\Users\dell\AppData\Local\Temp\pip-install-h7ictrqd\dlib\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\dell\AppData\Local\Temp\pip-record-8fa9q7wn\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

This is your error:
CMake must be installed to build the following extensions: dlib
Which tells it all. For the compilation to work, you need to install cmake.
But, since you are using anaconda, there is no reason to use pip to install dlib. It is actually not even recommended to use pip to install packages to your conda environment if it can be avoided. That said, simply use:
conda install -c conda-forge dlib
to install

Related

Can you help me install 'torch' package?

I am currently trying out a repository I found online. I started installing all packages required but couldn't get 'torch' to work. It always sais:
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
I tried different thing, such as:
pip3 install torch===1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install torch==1.7.0 -f https://download.pytorch.org/whl/torch_stable.html
And like it's listed on their website. But always the same output...
I also tried:
pip install pytorch
But all i get is:
Collecting pytorch
Downloading pytorch-1.0.2.tar.gz (689 bytes)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pytorch
Building wheel for pytorch (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\setup.py'"'"'; __file__='"'"'C:\\Users\\jus
p3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\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'"'"'))' bdist_wheel -d 'C:\Users\jusp3\AppData\Local\Temp\pip-wheel-6xyrhi_f'
cwd: C:\Users\jusp3\AppData\Local\Temp\pip-install-ya7jl_68\pytorch_8bbc783dd4124cbfbe681831291bca86\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\jusp3\AppData\Local\Temp\pip-install-ya7jl_68\pytorch_8bbc783dd4124cbfbe681831291bca86\setup.py", line 15, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
----------------------------------------
ERROR: Failed building wheel for pytorch
Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\setup.py'"'"'; __file__='"'"'C:\\Users\\j
usp3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\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\jusp3\AppData\Local\Temp\pip-record-bluie1pc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\include\site\python3.11\pytorch'
cwd: C:\Users\jusp3\AppData\Local\Temp\pip-install-ya7jl_68\pytorch_8bbc783dd4124cbfbe681831291bca86\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\jusp3\AppData\Local\Temp\pip-install-ya7jl_68\pytorch_8bbc783dd4124cbfbe681831291bca86\setup.py", line 11, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\setup.py
'"'"'; __file__='"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-ya7jl_68\\pytorch_8bbc783dd4124cbfbe681831291bca86\\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\jusp3\AppData\Local\Temp\pip-record-bluie1pc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\include\site\python3.11\pytorch' Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.3.1 is available.
You should consider upgrading via the 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe -m pip install --upgrade pip' command.
command: 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-uii0gp_r\\pytorch_7304807954de4167b1b57899aa1b5bf0\\setup.py'"'"'; __file__='"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-uii0gp_r\\pytorch_7304807954de4167b1b57899aa1b5bf0\\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\jusp3\AppData\Local\Temp\pip-record-oz49ylit\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\include\site\python3.11\pytorch'
cwd: C:\Users\jusp3\AppData\Local\Temp\pip-install-uii0gp_r\pytorch_7304807954de4167b1b57899aa1b5bf0\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\jusp3\AppData\Local\Temp\pip-install-uii0gp_r\pytorch_7304807954de4167b1b57899aa1b5bf0\setup.py", line 11, in <module>
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-uii0gp_r\\pytorch_7304807954de4167b1b57899aa1b5bf0\\setup.py'"'"'; __file__='"'"'C:\\Users\\jusp3\\AppData\\Local\\Temp\\pip-install-uii0gp_r\\pytorch_7304807954de4167b1b57899aa1b5bf0\\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\jusp3\AppData\Local\Temp\pip-record-oz49ylit\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\jusp3\OneDrive\Desktop\RedditVideoMakerBot-master\venv\include\site\python3.11\pytorch' Check the logs for full command output.
Any idea what's wrong?

Ansible-playbook issue using pexpect module

Some one can help with this issue please.
With python2 the interpreter can't use pexpect module :( at all.
Using python3 i got the error.
I tried to work arrond by installing pexpect module, without success
=======================================
PIP modules:
[root#localhost ansible_epo_test]# pip show pexpect DEPRECATION:
Python 2.7 reached the end of its life on January 1st, 2020. Please
upgrade your Python as Python 2.7 is no longer maintained. pip 21.0
will drop support for Python 2.7 in January 2021. More details about
Python 2 support in pip can be found at
https://pip.pypa.io/en/latest/development/release-process/#python-2-support
pip 21.0 will remove support for this functionality. Name: pexpect
Version: 3.3 Summary: Pexpect allows easy control of interactive
console applications. Home-page: http://pexpect.readthedocs.org/
Author: Noah Spurrier; Thomas Kluyver; Jeff Quast Author-email:
noah#noah.org; thomas#kluyver.me.uk; contact#jeffquast.com License:
ISC license Location: /usr/lib/python2.7/site-packages Requires:
Required-by: [root#localhost ansible_epo_test]# pip-3 show pexpect
Name: pexpect Version: 4.8.0 Summary: Pexpect allows easy control of
interactive console applications. Home-page:
https://pexpect.readthedocs.io/ Author: Noah Spurrier; Thomas Kluyver;
Jeff Quast Author-email: noah#noah.org, thomas#kluyver.me.uk,
contact#jeffquast.com License: ISC license Location:
/usr/local/lib/python3.6/site-packages Requires: ptyprocess
[root#localhost ansible_epo_test]# [root#localhost ansible_epo_test]#
[root#localhost ansible_epo_test]# [root#localhost ansible_epo_test]#
[root#localhost ansible_epo_test]# pip-3 list DEPRECATION: The default
format will switch to columns in the future. You can use
--format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. ansible
(2.9.6) ansible-autodoc (0.5.3) cffi (1.14.0) cryptography (2.8)
Jinja2 (2.11.1) MarkupSafe (1.1.1) pexpect (4.8.0) pip (9.0.3)
ptyprocess (0.7.0) pycparser (2.20) PyYAML (5.3.1) rpm (4.11.3)
setuptools (39.2.0) six (1.14.0) [root#localhost ansible_epo_test]#
ANSIBLE CODE:
- name: "Install the patch .jar "
expect:
command: "/opt/ibm/cics/bin/TXSeriesFixInstaller.sh {{patch_name}}"
responses:
'.*Press 1 for Installation, 2 to Usage or 3 to Cancel.*': '1'
'.*Do you want to proceed?.*': 'y'
echo: yes
chdir: "{{installation_dir}}/{{product_name}}"
vars:
ansible_python_interpreter: /usr/bin/python3
become: yes
become_user: root
register: install_patch_execution
ignore_errors: yes
when: '".jar" in patch_name'
OUTPUT:
<172.18.19.182> ESTABLISH SSH CONNECTION FOR USER: None
<172.18.19.182> SSH: EXEC sshpass -d9 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/1106f609b6 172.18.19.182 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /tmp/ansible-tmp-1630657688.0494435-190630914787996 `" && echo ansible-tmp-1630657688.0494435-190630914787996="` echo /tmp/ansible-tmp-1630657688.0494435-190630914787996 `" ) && sleep 0'"'"''
<172.18.19.182> (0, b'ansible-tmp-1630657688.0494435-190630914787996=/tmp/ansible-tmp-1630657688.0494435-190630914787996\n', b'')
Using module file /usr/local/lib/python3.6/site-packages/ansible/modules/commands/expect.py
<172.18.19.182> PUT /root/.ansible/tmp/ansible-local-29887paj4oih0/tmplewouwv_ TO /tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py
<172.18.19.182> SSH: EXEC sshpass -d9 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/1106f609b6 '[172.18.19.182]'
<172.18.19.182> (0, b'sftp> put /root/.ansible/tmp/ansible-local-29887paj4oih0/tmplewouwv_ /tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py\n', b'')
<172.18.19.182> ESTABLISH SSH CONNECTION FOR USER: None
<172.18.19.182> SSH: EXEC sshpass -d9 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/1106f609b6 172.18.19.182 '/bin/sh -c '"'"'chmod u+x /tmp/ansible-tmp-1630657688.0494435-190630914787996/ /tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py && sleep 0'"'"''
<172.18.19.182> (0, b'', b'')
<172.18.19.182> ESTABLISH SSH CONNECTION FOR USER: None
<172.18.19.182> SSH: EXEC sshpass -d9 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/1106f609b6 -tt 172.18.19.182 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bikuwrrsbrvqqqpnsttxannmfqpdgptf ; /usr/bin/python3 /tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<172.18.19.182> (1, b'Traceback (most recent call last):\r\n File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 102, in <module>\r\n _ansiballz_main()\r\n File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 94, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 40, in invoke_module\r\n runpy.run_module(mod_name=\'ansible.modules.commands.expect\', init_globals=None, run_name=\'__main__\', alter_sys=True)\r\n File "/usr/lib64/python3.6/runpy.py", line 205, in run_module\r\n return _run_module_code(code, init_globals, run_name, mod_spec)\r\n File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code\r\n mod_name, mod_spec, pkg_name, script_name)\r\n File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code\r\n exec(code, run_globals)\r\n File "/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py", line 246, in <module>\r\n File "/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py", line 205, in main\r\n File "/usr/local/lib/python3.6/site-packages/pexpect/run.py", line 100, in run\r\n cwd=cwd, env=env, **kwargs)\r\n File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 205, in __init__\r\n self._spawn(command, args, preexec_fn, dimensions)\r\n File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 304, in _spawn\r\n cwd=self.cwd, **kwargs)\r\n File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 315, in _spawnpty\r\n return ptyprocess.PtyProcess.spawn(args, **kwargs)\r\n File "/usr/local/lib/python3.6/site-packages/ptyprocess/ptyprocess.py", line 336, in spawn\r\n raise exception\r\nOSError: [Errno 8] Exec format error\r\n', b'Shared connection to 172.18.19.182 closed.\r\n')
<172.18.19.182> Failed to connect to the host via ssh: Shared connection to 172.18.19.182 closed.
<172.18.19.182> ESTABLISH SSH CONNECTION FOR USER: None
<172.18.19.182> SSH: EXEC sshpass -d9 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/1106f609b6 172.18.19.182 '/bin/sh -c '"'"'rm -f -r /tmp/ansible-tmp-1630657688.0494435-190630914787996/ > /dev/null 2>&1 && sleep 0'"'"''
<172.18.19.182> (0, b'', b'')
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 102, in <module>
_ansiballz_main()
File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.commands.expect', init_globals=None, run_name='__main__', alter_sys=True)
File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py", line 246, in <module>
File "/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py", line 205, in main
File "/usr/local/lib/python3.6/site-packages/pexpect/run.py", line 100, in run
cwd=cwd, env=env, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 205, in __init__
self._spawn(command, args, preexec_fn, dimensions)
File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 304, in _spawn
cwd=self.cwd, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py", line 315, in _spawnpty
return ptyprocess.PtyProcess.spawn(args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/ptyprocess/ptyprocess.py", line 336, in spawn
raise exception
OSError: [Errno 8] Exec format error
fatal: [172.18.19.182]: FAILED! => {
"changed": false,
"module_stderr": "Shared connection to 172.18.19.182 closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py\", line 102, in <module>\r\n _ansiballz_main()\r\n File \"/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py\", line 94, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/tmp/ansible-tmp-1630657688.0494435-190630914787996/AnsiballZ_expect.py\", line 40, in invoke_module\r\n runpy.run_module(mod_name='ansible.modules.commands.expect', init_globals=None, run_name='__main__', alter_sys=True)\r\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\r\n return _run_module_code(code, init_globals, run_name, mod_spec)\r\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\r\n mod_name, mod_spec, pkg_name, script_name)\r\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\r\n exec(code, run_globals)\r\n File \"/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py\", line 246, in <module>\r\n File \"/tmp/ansible_expect_payload_bxa5j6_h/ansible_expect_payload.zip/ansible/modules/commands/expect.py\", line 205, in main\r\n File \"/usr/local/lib/python3.6/site-packages/pexpect/run.py\", line 100, in run\r\n cwd=cwd, env=env, **kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py\", line 205, in __init__\r\n self._spawn(command, args, preexec_fn, dimensions)\r\n File \"/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py\", line 304, in _spawn\r\n cwd=self.cwd, **kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/pexpect/pty_spawn.py\", line 315, in _spawnpty\r\n return ptyprocess.PtyProcess.spawn(args, **kwargs)\r\n File \"/usr/local/lib/python3.6/site-packages/ptyprocess/ptyprocess.py\", line 336, in spawn\r\n raise exception\r\nOSError: [Errno 8] Exec format error\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
...ignoring
Thanks you,
The error encontred is regarding shebang #!/usr... in the script "/opt/ibm/cics/bin/TXSeriesFixInstaller.sh"
The script is provided by IBM so i can't fix it myself, so in order to fix that i used "ksh /opt/ibm/cics/bin/TXSeriesFixInstaller.sh"

when i tried to use "pip install locust" command on Windows 10 error happened

ERROR: Command errored out with exit status 1:
command: 'd:\py\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Administrator\AppData\Local\Temp\pip-install-tf1pv8t2\Confi
gArgParse\setup.py'"'"'; file='"'"'C:\Users\Administrator\AppData\Local\Temp\pip-install-tf1pv8t2\ConfigArgParse\setup.py'"'"';f=getattr(tokenize, '"'"'
open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-i
nfo
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-tf1pv8t2\ConfigArgParse
Complete output (36 lines):
Traceback (most recent call last):
File "d:\py\lib\site-packages\pkg_resources_init_.py", line 2857, in get_entry_map
ep_map = self.ep_map
File "d:\py\lib\site-packages\pkg_resources_init.py", line 2815, in getattr
raise AttributeError(attr)
AttributeError: _ep_map

Pillow installation error on Yocto core-base-image

I am trying to install Pillow in Yocto core-base-image but when i use pip3 install Pillow i get the following error message:
Running setup.py install for Pillow ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-1mienill/install-record.txt --single-version-externally-managed --compile:
.
.
.
File "/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py", line 687, in build_extensions
raise RequiredDependencyException(f)
__main__.RequiredDependencyException: jpeg
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py", line 903, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/var/volatile/tmp/pip-install-n_gnb4rr/Pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/volatile/tmp/pip-record-1mienill/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /var/volatile/tmp/pip-install-n_gnb4rr/Pillow/
I am including jpeg and libjpeg-turbo on loca.conf file as follows:
CONF_VERSION = "1"
MACHINE ?= "raspberrypi2"
INHERIT += "rm_work"
DL_DIR ?= "/home/<user>/poky-warrior-21.0.1/downloads"
CORE_IMAGE_EXTRA_INSTALL += " python3 python3-pip python3-dev git libjpeg-turbo jpeg libpng"
IMAGE_INSTALL_append = " opencv"
IMAGE_INSTALL_append = " cmake"
IMAGE_INSTALL_append = " nano"
IMAGE_INSTALL_append = " packagegroup-core-buildessential"
But its doesnt works, and here is my bblayers.conf file:
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/adrian/poky-warrior-21.0.1/meta \
/home/adrian/poky-warrior-21.0.1/meta-poky \
/home/adrian/poky-warrior-21.0.1/meta-yocto-bsp \
/home/adrian/poky-warrior-21.0.1/meta-raspberrypi \
/home/adrian/poky-warrior-21.0.1/meta-opencv \
/home/adrian/poky-warrior-21.0.1/meta-cmake \
/home/adrian/poky-warrior-21.0.1/meta-nano \
"

AttributeError: 'module' object has no attribute 'waitpid'

I am trying to install Python2.7.5 on windows using CYGWIN. I am getting the following error when I tried running the make
running build
running build_ext
ldd: /lib/libreadline.a: Permission denied
building '_struct' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/include -I/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Include -I/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5 -c /cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Modules/_struct.c -o build/temp.cygwin-1.7.24-i686-2.7/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Modules/_struct.o
Traceback (most recent call last):
File "./setup.py", line 2187, in <module>
main()
File "./setup.py", line 2182, in main
'Lib/smtpd.py']
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/core.py", line 152, in setup
dist.run_commands()
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/command/build.py", line 127, in run
self.run_command(cmd_name)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "./setup.py", line 251, in build_extensions
build_ext.build_extensions(self)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/command/build_ext.py", line 448, in build_extensions
self.build_extension(ext)
File "./setup.py", line 289, in build_extension
build_ext.build_extension(self, ext)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/command/build_ext.py", line 498, in build_extension
depends=ext.depends)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/unixccompiler.py", line 120, in _compile
extra_postargs)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/ccompiler.py", line 875, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/spawn.py", line 34, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/cygdrive/c/Users/Venkateshwaran/Downloads/Python-2.7.5.tar/Python-2.7.5/Lib/distutils/spawn.py", line 148, in _spawn_posix
pid, status = os.waitpid(pid, 0)
AttributeError: 'module' object has no attribute 'waitpid'
Makefile:471: recipe for target `sharedmods' failed
make: *** [sharedmods] Error 1
Previously I executed ./configure file and it was successful.

Resources