ModuleNotFoundError: No module named 'setuptools_rust'
Hi i am compiling the misp docker by this command on ubuntu 18
sudo docker-compose -f docker-compose.yml -f dev-docker-compose.yml -f build-docker-compose.yml build got error at this step
Step 26/48 : RUN git clone --depth 1 https://github.com/MISP/PyMISP.git; cd PyMISP || exit; python3 setup.py install ---> Running in e43e23542cf8 Cloning into 'PyMISP'...
after some logs got this
Installed /usr/local/lib/python3.7/dist-packages/lark_parser-0.11.2-py3.7.egg Searching for cryptography>=2.3 Reading https://pypi.org/simple/cryptography/ Downloading https://files.pythonhosted.org/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz#sha256=3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713 Best match: cryptography 3.4.7 Processing cryptography-3.4.7.tar.gz Writing /tmp/easy_install-e41odbn4/cryptography-3.4.7/setup.cfg Running cryptography-3.4.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-e41odbn4/cryptography-3.4.7/egg-dist-tmp-0g0cbyod
=============================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 "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/lib/python3/dist-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-e41odbn4/cryptography-3.4.7/setup.py", line 14, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "setup.py", line 67, in
Solution:
in server/Dockerfile
add below line after RUN pip3 install dxlmispservice
RUN pip3 install setuptools-rust
Simply upgrade your pip to the latest version. By default, Ubuntu has pip version 9.x. pip install --upgrade pip
CentOS 7.9 sudo pip3 install setuptools-rust sudo pip3 install --upgrade pip
CentOS 7.9 sudo pip3 install setuptools-rust sudo pip3 install --upgrade pip
This was the solution in my case.
Simply upgrade your pip to the latest version. By default, Ubuntu has pip version 9.x.
pip install --upgrade pip
Works great to me, thanks!
The upgrade works perfect to me! Just in case anyone is using ansible, you can add below snippet for this upgrade:
- name: Install and upgrade pip
pip:
name: pip
extra_args: --upgrade
executable: pip3
It seems to me from some experimentation that sometimes the very latest pip requires a python3 version that is not available on the host.
CentOS 7.9 sudo pip3 install setuptools-rust sudo pip3 install --upgrade pip
It worked for me trying to install check50 and submit50, Thanks alot.
Didn't work for me on Manjaro.
Even tried pacman -S python-setuptools-rust
Still looking for a solution