Opened 9 years ago

Closed 7 months ago

#46429 closed defect (wontfix)

nmap @6.47 +zenmap python modules not installed correctly

Reported by: felzmann (Ulrich Felzmann) Owned by: opendarwin.org@…
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: danielluke (Daniel J. Luke), neilt (Neil Tiffin)
Port: nmap

Description

zenmap can't find its python modules since they are installed in lib/python2.7/site-packages/zenmap instead of Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages I guess.

zenmap                                                                          
Could not import the zenmapGUI.App module: 'No module named zenmapGUI.App'.
I checked in these directories:
    /opt/macports/bin
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/py2app-0.9-py2.7.egg
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/modulegraph-0.12-py2.7.egg
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/altgraph-0.12-py2.7.egg
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyspread/src
    /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wx-3.0-osx_cocoa
If you installed Zenmap in another directory, you may have to add the
modules directory to the PYTHONPATH environment variable.

Works by manually setting the PYTHONPATH to lib/python2.7/site-packages/zenmap.

Change History (6)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: zenmap python removed
Owner: changed from macports-tickets@… to opendarwin.org@…
Port: @6.47 +zenmap removed

comment:2 Changed 8 years ago by neilt (Neil Tiffin)

Still a problem on El Capitan with MacPorts 2.3.4

comment:3 Changed 8 years ago by neilt (Neil Tiffin)

Cc: neilt@… added

Cc Me!

comment:4 Changed 6 years ago by ylluminarious (George Plymale II)

I had this same issue with nmap 7.70. I solved it by adding this to my shell startup (which was ~/.zshenv in my case):

export PYTHONPATH=/opt/local/lib/python2.7/site-packages

And I also had to add this to my /etc/sudoers (via visudo):

Defaults    env_keep += "PYTHONPATH"

comment:5 Changed 6 years ago by danielluke (Daniel J. Luke)

I don't use zenmap, so patches to fix this are welcome. I think we need to fix the nmap build to put the zenmap stuff into the correct site-packages dir (and push that change upstream). Alternatively, we could generate and install a .pth file (like the subversion-python27bindings port does).

comment:6 Changed 7 months ago by danielluke (Daniel J. Luke)

Resolution: wontfix
Status: newclosed

zenmap was moved out into its own separate port

Note: See TracTickets for help on using tickets.