Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'jwsprocessor' package could not be found! #5

Open
eadsjr opened this issue Aug 7, 2015 · 6 comments
Open

'jwsprocessor' package could not be found! #5

eadsjr opened this issue Aug 7, 2015 · 6 comments

Comments

@eadsjr
Copy link

eadsjr commented Aug 7, 2015

Running setup.py appear to work without an error message.

$ python setup.py install 
running install
running build
running build_py
copying src/jwsprocessor/tools.py -> build/lib/jwsprocessor
running build_mo
copying po/es.gmo -> share/locale/es/LC_MESSAGES/jwsprocessor.mo
running install_lib
creating /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/__init__.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/__init__.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/def_config.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/def_config.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/fc_calculator.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/jws_filechooser.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/jws_processing.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/jwslib.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/jwslib.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/main.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/main.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/OleFileIO_PL.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/OleFileIO_PL.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/options_page.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/pathconfig.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/process_form.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/pysmoothing.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/save_options_page.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/selection_page.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/selection_page.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/smoothing_selection.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/summary_page.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/tools.py -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor/tools.pyc -> /usr/local/lib/jwsprocessor
copying build/lib/jwsprocessor.py -> /usr/local/lib
running install_data
creating /usr/local/pixmaps
copying pixmaps/jwsprocessor.svg -> /usr/local/pixmaps
copying pixmaps/jwsprocessor.png -> /usr/local/pixmaps
copying etc/debugpath.cfg -> /usr/local/etc
creating /usr/local/doc
copying README -> /usr/local/doc
copying AUTHORS -> /usr/local/doc
copying LICENSE -> /usr/local/doc
copying ChangeLog -> /usr/local/doc
copying bin/jwsprocessor.py -> /usr/local/bin
copying bin/this_is_a_repository -> /usr/local/bin
copying share/locale/es/LC_MESSAGES/jwsprocessor.mo -> /usr/local/share/locale/es/LC_MESSAGES
running install_egg_info
Writing /usr/local/lib/jwsProcessor-0.2.0-py2.7.egg-info

However, running the jwsprocessor.py file afterwards throws an error.

$ /usr/local/bin/jwsprocessor.py 
adding /usr/local/lib to sys.path
'jwsprocessor' package could not be found!
@bebelher
Copy link

I had the same problem, and in my case pygtk was not installed. I installed it using hombrew (on Yosemite 10.10.5):

brew install pygtk

But then I got the error you mentioned about _backend_gdk (#4).

I reinstalled matplotlib with hombrew (instead of pip) with the following options:

brew install matplotlib --with-cairo --with-ghostscript --with-pygtk --with-pyqt --with-pyside --with-tcl-tk --with-tex

But it did not solve the problem.
If I try to launch jwsprocessor from the command line, I have the following error message:

adding /usr/local/lib to sys.path
2015-08-21 10:03:36.136 Python[9528:213662] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
'jwsprocessor' package could not be found!

I had a little more informations when I try to import jwsprocessor.main in python:

>>> import jwsprocessor.main
2015-08-21 10:15:13.753 Python[9552:219168] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/jwsprocessor/main.py", line 17, in <module>
    from selection_page import SelectionPage
  File "/usr/local/lib/jwsprocessor/selection_page.py", line 9, in <module>
    from smoothing_selection import ShowSpectrumPanel
  File "/usr/local/lib/jwsprocessor/smoothing_selection.py", line 6, in <module>
    from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
  File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", line 36, in <module>
    from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
  File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gdk.py", line 33, in <module>
    from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
ImportError: No module named _backend_gdk

As in #4, the gdk backend seems to be installed properly:

>>> import matplotlib
>>> matplotlib.rcsetup.all_backends
[u'GTK', u'GTKAgg', u'GTKCairo', u'MacOSX', u'Qt4Agg', u'Qt5Agg', u'TkAgg', u'WX', u'WXAgg', u'CocoaAgg', u'GTK3Cairo', u'GTK3Agg', u'WebAgg', u'nbAgg', u'agg', u'cairo', u'emf', u'gdk', u'pdf', u'pgf', u'ps', u'svg', u'template']

After installing gtk+3 with hombrew, and re-installing matplotlib adding the option --with-gtk+3, it is still not working:

>>> import jwsprocessor
>>> import jwsprocessor.main
2015-08-21 10:36:54.907 Python[11851:233091] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/jwsprocessor/main.py", line 17, in <module>
    from selection_page import SelectionPage
  File "/usr/local/lib/jwsprocessor/selection_page.py", line 9, in <module>
    from smoothing_selection import ShowSpectrumPanel
  File "/usr/local/lib/jwsprocessor/smoothing_selection.py", line 6, in <module>
    from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
  File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", line 36, in <module>
    from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK
  File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gdk.py", line 33, in <module>
    from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array
ImportError: No module named _backend_gdk
>>> import matplotlib
>>> matplotlib.rcParams['backend']
u'MacOSX'
>>> matplotlib.rcsetup.all_backends
[u'GTK', u'GTKAgg', u'GTKCairo', u'MacOSX', u'Qt4Agg', u'Qt5Agg', u'TkAgg', u'WX', u'WXAgg', u'CocoaAgg', u'GTK3Cairo', u'GTK3Agg', u'WebAgg', u'nbAgg', u'agg', u'cairo', u'emf', u'gdk', u'pdf', u'pgf', u'ps', u'svg', u'template']

Do you know where the problem can come from? Thanks in a advance!

@bebelher
Copy link

I think the problem might come from matplotlib itself. I tried to uninstall it, and to reinstall it with different options (using either pip or hombrew) but it didn't help. Eventually, I built it from the sources.
The header given by setup.py is:

============================================================================
Edit setup.cfg to change the build options

BUILDING MATPLOTLIB
            matplotlib: yes [1.5.dev1]
                python: yes [2.7.10 (default, Aug 19 2015, 08:13:40)  [GCC
                        4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]]
              platform: yes [darwin]

REQUIRED DEPENDENCIES AND EXTENSIONS
                 numpy: yes [version 1.9.2]
              dateutil: yes [using dateutil version 2.4.2]
                  pytz: yes [using pytz version 2015.4]
               tornado: yes [using tornado version 4.2.1]
             pyparsing: yes [using pyparsing version 2.0.3]
                libagg: yes [Requires patches that have not been merged
                        upstream. Using local copy.]
              freetype: yes [version 2.6.0]
                   png: yes [version 1.6.18]
                 qhull: yes [pkg-config information for 'qhull' could not be
                        found. Using local copy.]

OPTIONAL SUBPACKAGES
           sample_data: yes [installing]
              toolkits: yes [installing]
                 tests: yes [using nose version 1.3.7 / using mock 1.3.0]
        toolkits_tests: yes [using nose version 1.3.7 / using mock 1.3.0]

OPTIONAL BACKEND EXTENSIONS
                macosx: yes [installing, darwin]
                qt5agg: no  [PyQt5 not found]
                qt4agg: yes [installing, Qt: 4.8.7, PySide: 1.2.2; Qt:
                        4.8.6, PyQt: 4.8.6]
2015-08-21 16:30:00.925 Python[69174:404803] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
               gtk3agg: yes [installing, version 3.6.16]
2015-08-21 16:30:01.222 Python[69181:404868] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
             gtk3cairo: yes [installing, version 3.6.16]
2015-08-21 16:30:01.790 Python[69130:404726] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
                gtkagg: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                 tkagg: yes [installing, version 81008]
                 wxagg: no  [requires wxPython]
                   gtk: no  [The C/C++ header for gtk (gtk/gtk.h) could not
                        be found.  You may need to install the development
                        package.]
                   agg: yes [installing]
                 cairo: yes [installing, pycairo version 1.10.0]
             windowing: no  [Microsoft Windows only]

OPTIONAL LATEX DEPENDENCIES
                dvipng: yes [version 1.15]
           ghostscript: yes [version 9.16]
                 latex: yes [version 3.14159265]
               pdftops: no

It seems that the gtk libraries are not detected (even though they were installed with homebrew). However, the gdk and gtk backends are detected in python:

>>> import matplotlib
>>> matplotlib.rcParams['backend']
u'MacOSX'
>>> matplotlib.__version__
'1.5.dev1'
>>> matplotlib.rcsetup.all_backends
[u'GTK', u'GTKAgg', u'GTKCairo', u'MacOSX', u'Qt4Agg', u'Qt5Agg', u'TkAgg', u'WX', u'WXAgg', u'CocoaAgg', u'GTK3Cairo', u'GTK3Agg', u'WebAgg', u'nbAgg', u'agg', u'cairo', u'emf', u'gdk', u'pdf', u'pgf', u'ps', u'svg', u'template']

@gossein
Copy link

gossein commented Aug 26, 2015

Hi, I have the exact same issue on windows 7 and on OSX 10.10 and 10.11beta. On Ubuntu works like a charm, but it would be really nice to get it working on win and mac. Any ideas?

@tmnvanderberg
Copy link

I have the same issue on Arch linux using the 'ready to use' package.

@tmnvanderberg
Copy link

Going through jwsprocessor.py manually I find that

>>> import jwsprocessor.main Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/timon/Downloads/jws/jwsProcessor-0.2.0.ready_to_run/lib/jwsprocessor/main.py", line 17, in <module> from selection_page import SelectionPage File "/home/timon/Downloads/jws/jwsProcessor-0.2.0.ready_to_run/lib/jwsprocessor/selection_page.py", line 8, in <module> from tools import SpectraDB, _ File "/home/timon/Downloads/jws/jwsProcessor-0.2.0.ready_to_run/lib/jwsprocessor/tools.py", line 9, in <module> from numpy.oldnumeric import array, arange, Float ImportError: No module named numpy.oldnumeric

Oldnumeric was removed in Numpy 1.9 whereas Arch uses Numpy 1.14.

@tmnvanderberg
Copy link

Problem was caused by out-of-date code from Google sites. Trying fresh clone from this repo now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants