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

Jetson Orin NX Ubuntu 20.04 Python 3.8.x pip install error #630

Closed
Jai-GAY opened this issue Oct 26, 2023 · 4 comments
Closed

Jetson Orin NX Ubuntu 20.04 Python 3.8.x pip install error #630

Jai-GAY opened this issue Oct 26, 2023 · 4 comments

Comments

@Jai-GAY
Copy link

Jai-GAY commented Oct 26, 2023

Does anyone face the same issue?
Are there packages missing that cause this error? do i have to use python3 -m pip install --upgrade mavsdk?
Currently, this board does not install mavsdk before.

Python 3.8.10
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

pip3 install mavsdk

Collecting mavsdk
Downloading mavsdk-1.4.9-py3-none-manylinux2014_aarch64.whl (12.0 MB)
Collecting aiogrpc>=1.8
Downloading aiogrpc-1.8-py3-none-any.whl (10 kB)
Collecting grpcio>=1.50.0
Downloading grpcio-1.59.0.tar.gz (24.8 MB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vfc82mh_/grpcio/setup.py'"'"'; file='"'"'/tmp/pip-install-vfc82mh_/grpcio/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-vfc82mh_/grpcio/pip-egg-info
cwd: /tmp/pip-install-vfc82mh_/grpcio/
Complete output (9 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-vfc82mh_/grpcio/setup.py", line 95, in
import commands
File "/tmp/pip-install-vfc82mh_/grpcio/src/python/grpcio/commands.py", line 31, in
import support
File "/tmp/pip-install-vfc82mh_/grpcio/src/python/grpcio/support.py", line 111, in
errors.CompileError: diagnose_compile_error,
AttributeError: module 'setuptools.errors' has no attribute 'CompileError'
----------------------------------------
ERROR: Command errored out with exit status 1: **python setup.py egg_info Check the logs for full command** output.```
@julianoes
Copy link
Collaborator

Looks like this: grpc/grpc#34762

Can you try to upgrade setuptools first?

Alternatively, try installing the dependency using sudo apt install python3-grpcio.

@Jai-GAY
Copy link
Author

Jai-GAY commented Oct 31, 2023

Still getting error after upgrade setuptools from 45.2.0 to 52.0.0 (Pi 4B Bullseye Python3 3.9 was okay)

pip show setuptools
Name: setuptools
Version: 45.2.0

Collecting mavsdk
  Using cached mavsdk-1.4.9-py3-none-manylinux2014_aarch64.whl (12.0 MB)
Collecting grpcio>=1.50.0
  Downloading grpcio-1.59.2.tar.gz (24.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h2vdwosx/grpcio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h2vdwosx/grpcio/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-h2vdwosx/grpcio/pip-egg-info
         cwd: /tmp/pip-install-h2vdwosx/grpcio/
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-h2vdwosx/grpcio/setup.py", line 95, in <module>
        import commands
      File "/tmp/pip-install-h2vdwosx/grpcio/src/python/grpcio/commands.py", line 31, in <module>
        import support
      File "/tmp/pip-install-h2vdwosx/grpcio/src/python/grpcio/support.py", line 111, in <module>
        errors.CompileError: diagnose_compile_error,
    AttributeError: module 'setuptools.errors' has no attribute 'CompileError'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Collecting setuptools==52.0.0
Downloading setuptools-52.0.0-py3-none-any.whl (784 kB)
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
Installing collected packages: setuptools
Successfully installed setuptools-52.0.0

The following additional packages will be installed:
python3-linecache2 python3-pbr python3-traceback2 python3-unittest2
The following NEW packages will be installed:
python3-linecache2 python3-pbr python3-testresources python3-traceback2
python3-unittest2

Package Version


Adafruit-Blinka 8.22.4
adafruit-circuitpython-busdevice 5.2.6
adafruit-circuitpython-motor 3.4.12
adafruit-circuitpython-pca9685 3.4.11
adafruit-circuitpython-register 1.9.17
adafruit-circuitpython-requests 2.0.2
adafruit-circuitpython-servokit 1.3.16
adafruit-circuitpython-typing 1.9.4
Adafruit-PlatformDetect 3.52.3
Adafruit-PureIO 1.1.11
apturl 0.5.2
bcrypt 3.1.7
blinker 1.4
Brlapi 0.7.0
certifi 2019.11.28
chardet 3.0.4
Click 7.0
colorama 0.4.3
cryptography 2.8
cupshelpers 1.0
cycler 0.10.0
dbus-python 1.2.16
decorator 4.4.2
defer 1.0.6
distro 1.4.0
distro-info 0.23+ubuntu1.1
dnspython 1.16.0
duplicity 0.8.12.0
entrypoints 0.3
fasteners 0.14.1
future 0.18.2
gpg 1.13.1
httplib2 0.14.0
idna 2.8
Jetson.GPIO 2.1.1
keyring 18.0.1
kiwisolver 1.0.1
language-selector 0.1
launchpadlib 1.10.13
lazr.restfulclient 0.14.2
lazr.uri 1.0.3
linecache2 1.0.0
lockfile 0.12.2
louis 3.12.0
lxml 4.9.3
macaroonbakery 1.3.1
Mako 1.1.0
Markdown 3.1.1
MarkupSafe 1.1.0
matplotlib 3.1.2
MAVProxy 1.8.67
monotonic 1.5
numpy 1.17.4
oauthlib 3.1.0
olefile 0.46
onboard 1.4.1
packaging 20.3
pandas 0.25.3
paramiko 2.6.0
pbr 5.4.5
pexpect 4.6.0
Pillow 7.0.0
pip 20.0.2
protobuf 3.6.1
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pyftdi 0.55.0
Pygments 2.3.1
PyGObject 3.36.0
PyJWT 1.7.1
pymacaroons 0.13.0
pymavlink 2.4.40
PyNaCl 1.3.0
pyparsing 2.4.6
pyRFC3339 1.1
pyserial 3.5
python-apt 2.0.1+ubuntu0.20.4.1
python-dateutil 2.7.3
python-dbusmock 0.19
python-debian 0.1.36+ubuntu1.1
pytz 2019.3
pyusb 1.2.1
pyxdg 0.26
PyYAML 5.3.1
requests 2.22.0
requests-unixsocket 0.2.0
scipy 1.3.3
SecretStorage 2.3.1
setuptools 52.0.0
simplejson 3.16.0
six 1.14.0
systemd-python 234
testresources 2.0.0
traceback2 1.4.0
typing-extensions 4.8.0
ubuntu-advantage-tools 8001
ubuntu-drivers-common 0.0.0
unittest2 1.1.0
urllib3 1.25.8
urwid 2.0.1
wadllib 1.3.3
wheel 0.34.2
xkit 0.0.0

@Jai-GAY
Copy link
Author

Jai-GAY commented Oct 31, 2023

this solved the mavsdk installation, nothing to do with the old setuptools (45.2.0).

python -m pip install pip==20.3.4

Collecting mavsdk
  Using cached mavsdk-1.4.9-py3-none-manylinux2014_aarch64.whl (12.0 MB)
Collecting grpcio>=1.50.0
  Downloading grpcio-1.59.2-cp38-cp38-manylinux_2_17_aarch64.whl (5.1 MB)
Requirement already satisfied: protobuf<=3.20.1 in /usr/lib/python3/dist-packages (from mavsdk) (3.6.1)
Collecting aiogrpc>=1.8
  Using cached aiogrpc-1.8-py3-none-any.whl (10 kB)
Installing collected packages: grpcio, aiogrpc, mavsdk
Successfully installed aiogrpc-1.8 grpcio-1.59.2 mavsdk-1.4.9
WARNING: You are using pip version 20.3.4; however, version 23.3.1 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

@Jai-GAY Jai-GAY closed this as completed Oct 31, 2023
@julianoes
Copy link
Collaborator

Nice, thanks for the notes!

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

2 participants