question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pip install causes: ModuleNotFoundError: No module named 'binwalk.core.version'

See original GitHub issue

Sorry if this had been discussed before, But I was not able to find any mention of it.

I just installed binwalk on a new computer using the command python3 -m pip install git+https://github.com/ReFirmLabs/binwalk

I then tried to run the binwalk script (I tried using just binwalk and also tried python3 -m binwalk but got similar results) but got the following output:

$ binwalk
Traceback (most recent call last):
  File "/usr/bin/binwalk", line 25, in <module>
    import binwalk
  File "/usr/lib/python3.6/site-packages/binwalk/__init__.py", line 4, in <module>
    from binwalk.core.version import __version__ # This file is auto-generated by setup.py and ignored by .gitignore
ModuleNotFoundError: No module named 'binwalk.core.version'

$ python3 -m binwalk
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.6/site-packages/binwalk/__init__.py", line 4, in <module>
    from binwalk.core.version import __version__ # This file is auto-generated by setup.py and ignored by .gitignore
ModuleNotFoundError: No module named 'binwalk.core.version'

A quick ls revealed this:

$ ls /usr/lib/python3.6/site-packages/binwalk/core
    __init__.py
    __pycache__
    common.py
    compat.py
    display.py
    exceptions.py
    idb.py
    magic.py
    module.py
    plugin.py
    settings.py
    statuserver.py

The reason for this is because the arguments passed to setup.py look like this from pip: ['-c', 'bdist_wheel', '-d', '/tmp/pip-wheel-78sn9x5f', '--python-tag', 'cp36'] and version.py is only created if ‘install’ or ‘build’ is in the arguments

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:10
  • Comments:11

github_iconTop GitHub Comments

13reactions
5p0ng3b0bcommented, May 7, 2019

Hasn’t installed properly on a couple of systems for me using pip but the following always works.

git clone https://github.com/ReFirmLabs/binwalk.git
cd binwalk
sudo python setup.py install
9reactions
TheElementalOfDestructioncommented, Mar 8, 2019

@airplacepapercup

I’m afraid you don’t seem to get the title of the issue. The issue is not that I can’t install it, but that the module does not support pip installing.

I then even went on to give specifics on WHY the module does not support pip installing.

Pip installations make it very easy to add or remove modules, and having a module that doesn’t support it (and doesn’t support it because the installation is supposed to generate the version file) is rather uncommon in well known modules.

Also, please notice that I even went and responded with how I fixed it, indicating that a temporary solution to support pip installation has now been provided, something that your method unfortunately does not address.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'binwalk.core.version'
Pip install causes : ModuleNotFoundError: No module named 'binwalk.core.version'
Read more >
No module named 'binwalk.core' - YouTube
[SOLVED] ModuleNotFoundError : No module named ' binwalk. core '. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >
ModuleNotFoundError: No module named '__main__.xxxx ...
The cause of this problem is that the main.py was executed directly by python command, thus becoming the main module named __main__ ....
Read more >
ModuleNotFoundError: No module named 'binwalk'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'binwalk' How to remove the ModuleNotF.
Read more >
ModuleNotFoundError: No module named 'pip' in Python
The Python "ModuleNotFoundError: No module named 'pip'" occurs when pip is not installed in our Python environment. To solve the error, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found