Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to install airsim python #4920

Open
adityaomar3 opened this issue Jan 28, 2024 · 6 comments
Open

Not able to install airsim python #4920

adityaomar3 opened this issue Jan 28, 2024 · 6 comments

Comments

@adityaomar3
Copy link

adityaomar3 commented Jan 28, 2024

Bug report

  • AirSim Version/#commit:
  • UE/Unity version:
  • autopilot version:
  • OS Version:

What's the issue you encountered?

Settings

How can the issue be reproduced?

Include full error message in text form

pip install airsim
Collecting airsim
Using cached airsim-1.8.1.tar.gz (20 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-p10yc3u8\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-p10yc3u8\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-p10yc3u8\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
super(BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-p10yc3u8\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 2, in
File "C:\Users\Omar\AppData\Local\Temp\pip-install-7xlbe5zy\airsim_52dcecb4260c4b7aa1dbabc16a8c5fea\airsim_init
.py", line 1, in
from .client import *
File "C:\Users\Omar\AppData\Local\Temp\pip-install-7xlbe5zy\airsim_52dcecb4260c4b7aa1dbabc16a8c5fea\airsim\client.py", line 3, in
from .utils import *
File "C:\Users\Omar\AppData\Local\Temp\pip-install-7xlbe5zy\airsim_52dcecb4260c4b7aa1dbabc16a8c5fea\airsim\utils.py", line 1, in
import numpy as np #pip install numpy
^^^^^^^^^^^^^^^^^^
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: python.exe -m pip install --upgrade pip
PS C:\project\photogrammetry> pip install airsim
Collecting airsim
Using cached airsim-1.8.1.tar.gz (20 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-gfvytytx\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-gfvytytx\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-gfvytytx\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
super(BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\Omar\AppData\Local\Temp\pip-build-env-gfvytytx\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 2, in
File "C:\Users\Omar\AppData\Local\Temp\pip-install-4likky2c\airsim_997319d56f7d48fca1814ce8fe1b6524\airsim_init
.py", line 1, in
from .client import *
File "C:\Users\Omar\AppData\Local\Temp\pip-install-4likky2c\airsim_997319d56f7d48fca1814ce8fe1b6524\airsim\client.py", line 3, in
from .utils import *
File "C:\Users\Omar\AppData\Local\Temp\pip-install-4likky2c\airsim_997319d56f7d48fca1814ce8fe1b6524\airsim\utils.py", line 1, in
import numpy as np #pip install numpy
^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'numpy'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

It is not able to install airsim even numpy is already installed
What's better than filing an issue? Filing a pull request :).

@Augustiu
Copy link

Augustiu commented Feb 6, 2024

i met the same problem,how to fix it?

@Mohmansy94
Copy link

Try to use python version 3.8, it should work without any problem.

@Garans
Copy link

Garans commented Mar 11, 2024

I used version 3.8 but met the same problem, for solved this issue I patched setup.py and install local package pip install .

import setuptools
# from airsim import __version__

with open("README.md", "r") as fh:
    long_description = fh.read()

setuptools.setup(
    name="airsim",
    version="1.8.1",
    author="Shital Shah",
    author_email="[email protected]",
    description="Open source simulator based on Unreal Engine for autonomous vehicles from Microsoft AI & Research",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/microsoft/airsim",
    packages=setuptools.find_packages(),
	license='MIT',
    classifiers=(
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ),
    install_requires=[
          'msgpack-rpc-python', 'numpy', 'opencv-contrib-python'
    ],
)

@durach
Copy link

durach commented Mar 13, 2024

@Garans, thanks, that helped. But I experience the issue only in pyenv (Mac). Everything worked fine on conda (Win)

@Garans
Copy link

Garans commented Mar 13, 2024

I'm using this lib with remote connect from Mac to win

@MiguelPujol
Copy link

MiguelPujol commented Apr 10, 2024

I have the same issue when trying to install airsim python package version 1.6.0, 1.7.0 and 1.8.1 (latest) using Python 3.12.
However I did manage to successfully install version 1.5.0.

Update: I ran into issues running the client.simGetImages() with airsim 1.5.0. Eventually I just downloaded the airsim 1.8.1 python package and installed it manually (instead of pip) by opening command prompt in the downloaded airsim package and running "python setup.py install". Now I am able to use airsim without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants