Ask coding questions

← Back to all posts
Boto won't install in Replit due to Crytography package


I'm trying to pair with folks using boto3 and moto in tests, and when I add from moto import mock_s3, it seems to require the crypography package, which fails to install. Are there any workarounds I can use for this?


OK, so things seem to be squirrely here and this is how I finally got my tests to work in this environment:

  1. I followed the instructions for cryptography to install it on a Linux distro. Replit appears to be using Ubuntu 18.04, so here is what I did:

After those packages are installed, I ran the following:

This now works; now I just needed to get around Poetry because it kept trying to re-install Moto with the packages of it's choice, but I need it to use no-binary, so here is how I got around that:

Now, I just need to avoid using the Run button, and instead run my tests from the shell as follow:

I hope this helps anyone else trying to use Moto and Boto in Replit. It took me several hours to sort this out.



Just gonna remind you that Nix repls are a thing for when you need packages(it's surprising what you can get on there).

Also: You, my friend, are a badass. 👍



Thanks @Highwayman! I didn't know that Nix repls are a thing, thanks for the tip. I'll check those out next time I run into problems :)


Ah! yw then! :)