Cannot use the cryptography package: No module named 'setuptools_rust'
See original GitHub issueI have cryptography==3.4.7
in my requirements.txt
which results in this error:
Finished cargoSetupPostPatchHook
configuring
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
=============================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 "nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 14, in <module>
from setuptools_rust import RustExtension
ModuleNotFoundError: No module named 'setuptools_rust'
builder for '/nix/store/kj5y3d9i4h56rsa69v6dr0cf792lrv4n-python3.8-cryptography-3.4.7.drv' failed with exit code 1
cannot build derivation '/nix/store/cxgf9v895i1ig5l4mzklvp51a54nc36k-python3-3.8.9-env.drv': 1 dependencies couldn't be built
error: build of '/nix/store/cxgf9v895i1ig5l4mzklvp51a54nc36k-python3-3.8.9-env.drv' failed
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No module named 'setuptools_rust' with cryptography==3.4
EDIT: tl;dr: run "pip install --upgrade pip". You don't need to install Rust! Use --prefer-binary to make sure you're not rebuilding from ...
Read more >Python 3.6.9 . ImportError: No module named setuptools_rust ...
Try installing setuptools_rust first: pip install setuptools_rust. And then installing pyOpenSSL again.
Read more >Fix the “no module named” error in Python - Anto Online
This post will show you how to fix the “ModuleNotFoundError: No module” error. This example will focus on no module named setuptools_rust on...
Read more >No module named 'setuptools_rust' while running pip3 install ...
Try `pip3 install --user` instead. successfully install cryptography: Upgrade to the latest pip and try again. This will fix errors for most ...
Read more >No Module Named 'setuptools_rust' in Python - Finxter
Quick Fix: Python raises the ImportError: No module named 'setuptools_rust' when it cannot find the library setuptools_rust . The most frequent source of ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding
setuptools_rust
to requirements fixes this problem to me.Indeed, for now, this works! I’ll keep this issue open until the problem is properly fixed.