Ask Your Question

ImportError: No module named Crypto

asked 2019-08-20 10:12:02 -0500

iggy12345 gravatar image

updated 2019-08-20 10:19:52 -0500

gvdhoorn gravatar image

I'm having my coworker follow the directions on this page to install rosbag
so that he can reindex corrupted .bag files in the future, we've followed the directions to a 'T' but are still receiving this import error:

Traceback (most recent call last):
  File "C:\opt\ros\melodic\x64\bin\rosbag", line 34, in <module>
    import rosbag
  File "C:\opt\ros\melodic\x64\lib\site-packages\rosbag\", line 33, in <module>
    from .bag import Bag, Compression, ROSBagException, ROSBagFormatException, ROSBagUnindexedException
  File "C:\opt\ros\melodic\x64\lib\site-packages\rosbag\", line 53, in <module>
    from Crypto import Random
ImportError: No module named Crypto

we tried installing Crypto and pycrypto manually, which all come back as successfull, but the error persists

Windows 10
Visual Studio 2019 Community Edition
2019 Build Tools, and the Microsoft C++ Compiler for Python 2.7
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-08-26 12:18:02 -0500

updated 2019-08-26 16:23:49 -0500

Just ran into it while creating a new python environment. Solved it with: pip install pycryptodome

edit flag offensive delete link more

answered 2019-08-21 16:47:17 -0500

OoeyGUI gravatar image

Thank you for the report. This is the first I've seen of this, so I created a tracking bug in the ROS on Windows Github.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-08-20 10:12:02 -0500

Seen: 132 times

Last updated: Aug 26