Make zenmap wants python3-build. How do I get it?

In attempting to compile zenmap from source I encountered an error:

/usr/bin/python3 -m build zenmap/
/usr/bin/python3: No module named build

I’ve attempted to locate and install python3-build, but I keep encountering dependency problems. I see in the release notes for leap 15.6 that python-PEP517 was removed from the release. I found a repository that wants to provide it, but it is failing a dependency for “python(abi)=3.10”. I really don’t want to keep adding repositories and different versions of things. Doing os increases entropy.

Is there a clean way of getting python3-build?

From the zenmap README:

   Zenmap's source package are provided in such a way that, if you have
   all the required software, it will run 'out-of-the-tarball'. To run
   the program without installing it, after unpacking the source
   distribution do one of the following:
     * Double click the zenmap file
     * Call the Python interpreter on the zenmap file

briefly testing it after installing nmap package confirms (at least, I got zenmap GUI).

Otherwise I am not sure where build comes from. The same README suggests using pip to instal.

Clicking on the file nmap-7.95/zenmap/zenmap gives me the option to execute, but nothing happens when I choose it. I know very little about running a python app. I tried ‘python zenmap’ but there is no python command. ‘python3 zenmap’ results in:

~/Downloads/org/nmap/nmap-7.95/zenmap> python3 zenmap
Traceback (most recent call last):
  File "zenmap", line 111, in <module>
    import zenmapGUI.App
  File "/home/hattons/Downloads/org/nmap/nmap-7.95/zenmap/zenmapGUI/App.py", line 99, in <module>
    from zenmapCore.UmitConf import is_maemo, SearchConfig
  File "/home/hattons/Downloads/org/nmap/nmap-7.95/zenmap/zenmapCore/UmitConf.py", line 64, in <module>
    from zenmapCore.Paths import Path
  File "/home/hattons/Downloads/org/nmap/nmap-7.95/zenmap/zenmapCore/Paths.py", line 209, in <module>
    Path = Paths()
  File "/home/hattons/Downloads/org/nmap/nmap-7.95/zenmap/zenmapCore/Paths.py", line 123, in __init__
    NMAPPATH = dirname(shutil.which("nmap", path=PATH))
  File "/usr/lib64/python3.6/posixpath.py", line 156, in dirname
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType

I had zenmap installed and working, but I had dependency errors. So I decided to build and install it myself. That has become a very frustrating exercise.

Apparently python3-build is an implementation of something called PEP517.

If I knew more about python, I could probably fix this easily.

You do not have nmap installed or present in $PATH.

zenmap is part of nmap. The plan was to build it all and install it as a whole.

So what? Running zenmap requires that nmap binary is available. How you get this binary is irrelevant.

I did ‘export PYTHONPATH=“/usr/lib64/python3.6/distutils/command”’ and got it to build. For some reason ‘make install’ doesn’t install zenmap. The ‘python3 -m pip install .’ didn’t do it either. I can run it from the source tree.

If it’s in the nmap package, why build? Just install nmap and run zenmap.

Nevertheless, you can install it by installing python[ver]-build. Replacing [ver] with 310, 311, or 312 depending on which version of python is being used.

Apparently the problem was not that python-build wasn’t installed. The problem was that the location of build.py wasn’t in the environment variables. Nonetheless, ‘make install’ failed to install zenmap. Interestingly, ‘make uninstall’ did try to remove zenmap.

I’ve given up on trying to build it myself. I haven’t read a Makefile in 10 years, and don’t want to take the time to relearn it right now. The reason that I wanted to build and install all of nmap with zenmap was because it’s the right way to do it. I already have zenmap from the add-on RPM, I just wanted to get rid of the spurious and annoying dependency failure message.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.