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.

3

There are 3 best solutions below

0
On

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.

1
On

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

0
On

You should try installing python 3.8.16 environment by anaconda or other ways. Then install numpy, opencv-contrib-python and msgpack-rpc-python. This works for me but idk why python versions affect the installation of airsim