Hi
I didnt use my Nvidia Jetson for a week and now suddenly importing numpy, cv2 etc in python3, running any pip3 commands in the terminal gives me this message:
OSError: [Errno 74] Bad message: ‘/home/esben/.local/lib/python3.6/site-packages/Cython-0.29.15.dist-info’
From what i have found on the internet it might be a corrupted file. Is there a way to avoid having to re-install python3 and all packages?
Hi,
Have you tried to reinstall the cython package first?
$ sudo pip3 uninstall setuptools-cython
$ sudo pip3 install setuptools-cython
Thanks.
Hi
Thanks for the reply! I ended up manually deleting all problematic folders, thereby also the setuptools folder in python, and reinstalled it. Maybe I only had to do what you suggests, but it works now :D
Kind regards
You may also install cython with:
apt-get install cython3
… for python3 and …
apt-get install cython
… for python2
These are tested against other system python packages provided by Canonical, while those on PyPi are not. Installing PyPi packages to the system python path may cause system breaking conflicts. Also PyPi has no two factor authentication currently and anybody can publish packages, while apt packages are cryptographically signed by Canonical. It’s common on PyPi to find malware with similar names to real packages in the hope of a typo,
https://askubuntu.com/questions/802544/is-sudo-pip-install-still-a-broken-practice
While not using sudo pip
will not protect you from everything, it will help avoid a broken python install, like you are experiencing, and follows the principle of least privilege.