Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output, while installing: drun-airsim-client by pip - pip

I'm having a problem to install the drun-airsim-client package (https://pypi.org/project/drun-airsim-client/). I am using a virtual environment and my python version is 3.8.10, my OS is Ubuntu 20.04. This is the log for the error.
ERROR: Command errored out with exit status 1:
command: '/home/USER/DRONE/venv/bin/python3' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-e0459yt7/airsim/setup.py'"'"'; __file__='"'"'/tmp/pip-install-e0459yt7/airsim/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 /tmp/pip-install-e0459yt7/airsim/pip-egg-info
cwd: /tmp/pip-install-e0459yt7/airsim/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-e0459yt7/airsim/setup.py", line 2, in <module>
from airsim import __version__
File "/tmp/pip-install-e0459yt7/airsim/airsim/__init__.py", line 1, in <module>
from .client import *
File "/tmp/pip-install-e0459yt7/airsim/airsim/client.py", line 3, in <module>
from .utils import *
File "/tmp/pip-install-e0459yt7/airsim/airsim/utils.py", line 1, in <module>
import numpy as np #pip install numpy
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Can you please suggest me a solution, I have never faced this problem before with other packages & I have look for a solution but I still have the same error.
Thanks in advance.

It's a bug in airsim package: its setup.py imports airsim module and the module imports everything else. That is, setup.py imports all the dependencies before they are installed.
Please report the bug.

If you run !pip install msgpack-rpc-python before it should work

Related

Poetry: always have to install setuptools manually in CI

Im building my Circle CI flow with Poetry. Everything works well, except the thing that i should install setuptools always manually. It looks like this:
steps:
- checkout
- restore_cache:
keys:
- pip-{{ checksum "poetry.lock" }}-{{ .Environment.CACHE_VERSION }}
- run:
name: install dependencies
command: |
poetry config virtualenvs.in-project true
poetry config virtualenvs.path /project
poetry run pip install --upgrade pip setuptools
poetry install
poetry show -v
steps:
- run:
name: pytest
command: |
poetry run pip install setuptools
poetry run pytest -sv tests/unittests
If im removing manual installation of setuptools, installing of some packages are failing with the same traceback. Example:
Installing googleads (29.0.0): Failed
EnvCommandError
Command ['/home/circleci/project/.venv/bin/pip', 'install', '--no-deps', '/home/circleci/.cache/pypoetry/artifacts/05/59/83/1fa9c7bc74df8656d6fa40f159fa169c10a9a110501f2ec8260c8cd3e1/googleads-29.0.0.tar.gz'] errored with the following return code 1, and output:
Processing /home/circleci/.cache/pypoetry/artifacts/05/59/83/1fa9c7bc74df8656d6fa40f159fa169c10a9a110501f2ec8260c8cd3e1/googleads-29.0.0.tar.gz
ERROR: Command errored out with exit status 1:
command: /home/circleci/project/.venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-e9n99b4s/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-e9n99b4s/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'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-8t_uwvq3
cwd: /tmp/pip-req-build-e9n99b4s/
Complete output (3 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
----------------------------------------
WARNING: Discarding file:///home/circleci/.cache/pypoetry/artifacts/05/59/83/1fa9c7bc74df8656d6fa40f159fa169c10a9a110501f2ec8260c8cd3e1/googleads-29.0.0.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 22.3.1 is available.
You should consider upgrading via the '/home/circleci/project/.venv/bin/python -m pip install --upgrade pip' command.
at /usr/local/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
Tests are also failing if manual installation of setuptools gonna be removed, if i will not install setuptools manually on the test step. All tests are also failing with the same trace:
collection failure
ImportError while importing test module '/home/circleci/project/tests/unittests/hsplib/test_spark.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unittests/hsplib/test_spark.py:9: in <module>
from tests.unittests.testlib.asserts import assert_df_equal_2
tests/unittests/testlib/asserts.py:5: in <module>
import chispa
.venv/lib/python3.8/site-packages/chispa/__init__.py:28: in <module>
from .dataframe_comparer import DataFramesNotEqualError, assert_df_equality, assert_approx_df_equality
.venv/lib/python3.8/site-packages/chispa/dataframe_comparer.py:1: in <module>
from chispa.prettytable import PrettyTable
.venv/lib/python3.8/site-packages/chispa/prettytable.py:44: in <module>
import pkg_resources
E ModuleNotFoundError: No module named 'pkg_resources'
I want to get rid from this manual setuptools installation, but i cant understand whats wrong with it. It feels like a code smell. What i tryed:
Adding setuptools as one of the dependencies in pyproject.toml file - no effect
Adding setuptools to build-system requires - also no effect.
Adding virtualenvs.options.no-setuptools = false to poetry config. It should be by default, but i tryed to setup it manually. No effect.
The only issue, that looks like a similar one that i found is this one:
https://github.com/python-poetry/poetry/issues/4242
But there is still no answer there what to do.
My poetry version 1.3.2
pip version 22.0.4
Seems like your project depends on some libraries that are poorly packaged. You should raise up the issue towards their maintainers on their issue trackers:
https://github.com/googleads/googleads-python-lib/issues
https://github.com/MrPowers/chispa/issues

ModuleNotFoundError: No module named '_ctypes' error on macOS Big Sur even after installing libffi

I have been trying to install flask via pip3 on my Mac, but I keep running into this error. I tried installing libffi through brew, and reinstalling python but still does not work.
ERROR: Command errored out with exit status 1:
command: /Users/prachimodi/Desktop/api/.venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/setup.py'"'"'; __file__='"'"'/private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/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 /private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-pip-egg-info-fb3uduhe
cwd: /private/var/folders/zs/w0tb5f4d6dd_c098p_y7f5_r0000gn/T/pip-install-j9j3d44b/MarkupSafe/
Complete output (11 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/__init__.py", line 19, in <module>
from setuptools.dist import Distribution
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/dist.py", line 34, in <module>
from setuptools import windows_support
File "/Users/prachimodi/Desktop/api/.venv/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/Users/prachimodi/.pyenv/versions/3.7.9/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

an error shows when I try to install submit50

C:\Users\BISMILLAH>pip install submit50
Collecting submit50
Using cached submit50-3.0.2.tar.gz (5.5 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\bismillah\appdata\local\programs\python\python36-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\BISMILLAH\\AppData\\Local\\Temp\\pip-install-enj227ls\\submit50\\setup.py'"'"'; __file__='"'"'C:\\Users\\BISMILLAH\\AppData\\Local\\Temp\\pip-install-enj227ls\\submit50\\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 'C:\Users\BISMILLAH\AppData\Local\Temp\pip-install-enj227ls\submit50\pip-egg-info'
cwd: C:\Users\BISMILLAH\AppData\Local\Temp\pip-install-enj227ls\submit50\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\BISMILLAH\AppData\Local\Temp\pip-install-enj227ls\submit50\setup.py", line 2, in <module>
raise RuntimeError("submit50 does not support Windows directly. Instead, you should install the Windows Subsystem for Linux (https://learn.microsoft.com/en-us/windows/wsl/install-win10) and then install submit50 within that.")
RuntimeError: submit50 does not support Windows directly. Instead, you should install the Windows Subsystem for Linux (https://learn.microsoft.com/en-us/windows/wsl/install-win10) and then install submit50 within that.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Turns out submit50 doesn't run on Windows but this solution worked for me:
https://github.com/cs50/submit50/issues/196#issuecomment-617907204

Python3 I try to install lshash 0.0.4dev on windows 10

I am trying to install lshash 0.0.4dev
with pip install lshash on anconda promot
and I get this error:
enter image description here
(base) C:\Users\User>python -m pip install lshash
Collecting lshash
Using cached lshash-0.0.4dev.tar.gz (7.2 kB)
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-xq8e0vo7\\lshash\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-xq8e0vo7\\lshash\\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 'C:\Users\User\AppData\Local\Temp\pip-install-xq8e0vo7\lshash\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-xq8e0vo7\lshash\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-xq8e0vo7\lshash\setup.py", line 3, in <module>
import lshash
File "C:\Users\User\AppData\Local\Temp\pip-install-xq8e0vo7\lshash\lshash\__init__.py", line 12, in <module>
from lshash import LSHash
ImportError: cannot import name 'LSHash' from 'lshash' (C:\Users\User\AppData\Local\Temp\pip-install-xq8e0vo7\lshash\lshash\__init__.py)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I hope someone can help me.
lshash 0.0.4dev was released on Apr 27, 2013. The project seems to be abandoned at the very early stage of development. The code is obviously Python2-only.
Try installing lshash3 instead
https://pypi.org/project/lshash3/

Getting Error with "pip install pyrebase"

ERROR: Command errored out with exit status 1:
command: 'c:\users\sasa_\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sasa_\\AppData\\Local\
\Temp\\pip-install-dfyu35fv\\jws\\setup.py'"'"'; __file__='"'"'C:\\Users\\sasa_\\AppData\\Local\\Temp\\pip-install-dfyu35fv\\jws\\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 'C:\Users\sasa_\AppData
\Local\Temp\pip-install-dfyu35fv\jws\pip-egg-info'
cwd: C:\Users\sasa_\AppData\Local\Temp\pip-install-dfyu35fv\jws\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sasa_\AppData\Local\Temp\pip-install-dfyu35fv\jws\setup.py", line 17, in <module>
long_description=read('README.md'),
File "C:\Users\sasa_\AppData\Local\Temp\pip-install-dfyu35fv\jws\setup.py", line 5, in read
return open(os.path.join(os.path.dirname(__file__), fname)).read()
UnicodeDecodeError: 'cp932' codec can't decode byte 0x93 in position 502: illegal multibyte sequence
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Tried with
pip install --upgrade setuptools
pip install pycryptodome
pip install shapely==1.4.1
Still cant

Resources