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

ImportError: No module named setuptools_rust on clean Ubuntu 16.04 (Python 2.7) #166

Open
Zhiwei-Z opened this issue Jul 9, 2021 · 1 comment

Comments

@Zhiwei-Z
Copy link

Zhiwei-Z commented Jul 9, 2021

Steps to reproduce

  1. On a clean installed Ubuntu 16.04 with python 2.7
  2. Follow the instruction on https://pyrobot.org/docs/software
  3. When running ./locobot_install_all.sh -t full -p 2 -l interbotix the error happened

Observed Results

Output log:

  Collecting cryptography
  Downloading https://files.pythonhosted.org/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz (546kB)
    100% |████████████████████████████████| 552kB 2.2MB/s 
    Complete output from command python setup.py egg_info:
    
            =============================DEBUG ASSISTANCE==========================
            If you are seeing an error here please try the following to
            successfully install cryptography:
    
            Upgrade to the latest pip and try again. This will fix errors for most
            users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
            =============================DEBUG ASSISTANCE==========================
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-OJ8V9B/cryptography/setup.py", line 14, in <module>
        from setuptools_rust import RustExtension
    ImportError: No module named setuptools_rust
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OJ8V9B/cryptography/
You are using pip version 8.1.1, however version 21.1.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

After running the recommended fix pip install --upgrade pip, pip no longer works: any pip operation or even just typing pip will result in the error

Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
  File "/home/locobot3/.local/lib/python2.7/site-packages/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named typing

I don't think typing is introduced in python 2.7 hence the pip problem.

What is the correct branch / release that I should install on a clean Ubuntu 16.04 with Python 2.7? Or should I use python3 instead?

@jack6099boy
Copy link

You can try the following command to upgrade your pip

sudo apt-get remove python-pip
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python2.7 get-pip.py
hash -r

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