Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried building this application via downloading from http://sourceforge.net/projects/miramath/?source=dlp & in the process have already downloaded +500mb data but at one point I am constantly failing... This was the output that I finally got after install many dependencies:

sudo python main.py
Traceback (most recent call last):
  File "main.py", line 28, in <module>
    from mainwindow import *
  File "/home/usama/Downloads/miramath/mainwindow.py", line 24, in <module>
    import worksheet
  File "/home/usama/Downloads/miramath/worksheet.py", line 37, in <module>
    import polarplot
  File "/home/usama/Downloads/miramath/polarplot.py", line 30, in <module>
    from polarplotwidget import PolarPlotWidget
  File "/home/usama/Downloads/miramath/polarplotwidget.py", line 29, in <module>
    class PolarPlotWidget(Qwt.QwtPolarPlot):
AttributeError: 'module' object has no attribute 'QwtPolarPlot'

so I downloaded PyQwt via http://sourceforge.net/projects/miramath/files/PyQwt-Polar/

as per the manual I navigated to the configure folder & ran:

python configure.py -Q ../qwt-5.2
Command line options:
{'debug': False,
 'disable_numarray': False,
 'disable_numeric': False,
 'disable_numpy': False,
 'excluded_features': [],
 'extra_cflags': [],
 'extra_cxxflags': [],
 'extra_defines': [],
 'extra_include_dirs': [],
 'extra_lflags': [],
 'extra_lib_dirs': [],
 'extra_libs': [],
 'jobs': '',
 'module_install_path': '',
 'modules': [],
 'qt': 4,
 'qwt_sources': '../qwt-5.2',
 'sip_include_dirs': [],
 'subdirs': [],
 'timelines': [],
 'trace': ''}

Found SIP-4.13.3.
Found 'posix' operating system:
2.7.3 (default, Sep 26 2012, 21:53:58) 
[GCC 4.7.2]
Do not get upset by error messages in the next 3 compiler checks:
Check if 'size_t' and 'unsigned int' are the same type:
YES
Check if 'size_t' and 'unsigned long' are the same type:
size_t_check.cpp:3:6: error: prototype for ‘void a::f(long unsigned int)’ does not match any in class ‘a’
size_t_check.cpp:2:24: error: candidate is: void a::f(size_t)
NO
Check if 'size_t' and 'unsigned long long' are the same type:
size_t_check.cpp:3:6: error: prototype for ‘void a::f(long long unsigned int)’ does not match any in class ‘a’
size_t_check.cpp:2:24: error: candidate is: void a::f(size_t)
NO
Failed to import numarray: PyQwt will be build without support for numarray.

Failed to find Numeric2: PyQwt will be build without support for Numeric.

Found NumPy-1.6.2.

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I../qwt-5.2/src -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I. -o qwt_version_info.o qwt_version_info.cpp
g++ -Wl,-O1 -o qwt_version_info qwt_version_info.o    -L/usr/lib/i386-linux-gnu -lQtCore -lpthread 
Found Qwt-5.2.1.

Extended command line options:
{'debug': False,
 'disable_numarray': False,
 'disable_numeric': False,
 'disable_numpy': False,
 'excluded_features': ['-x HAS_PYQT_031105',
                       '-x HAS_NUMARRAY',
                       '-x HAS_NUMERIC',
                       '-x HAS_QWT4'],
 'extra_cflags': [],
 'extra_cxxflags': [],
 'extra_defines': ['HAS_NUMPY'],
 'extra_include_dirs': ['/usr/include/python2.7',
                        '/usr/lib/python2.7/dist-packages/numpy/core/include'],
 'extra_lflags': [],
 'extra_lib_dirs': [],
 'extra_libs': [],
 'iqt': 'iqt5qt4',
 'iqt_sipfile': '../sip/iqt5qt4/IQtModule.sip',
 'jobs': '',
 'module_install_path': '/usr/lib/python2.7/dist-packages/PyQt4/Qwt5',
 'modules': ['iqt', 'Qwt5'],
 'qt': 4,
 'qwt': 'qwt5qt4',
 'qwt_sipfile': '../sip/qwt5qt4/QwtModule.sip',
 'qwt_sources': '../qwt-5.2',
 'sip_include_dirs': [],
 'subdirs': ['iqt5qt4', 'qwt5qt4'],
 'timelines': ['-t Qwt_5_2_0'],
 'trace': ''}

The following modules will be built: ['iqt', 'Qwt5'].

Setup the PyQwt package build.
sip invokation:
'/usr/bin/sip -b tmp-iqt5qt4/iqt5qt4.sbf -c tmp-iqt5qt4   ../sip/iqt5qt4/IQtModule.sip'
sh: 1: /usr/bin/sip: not found
SIP failed to generate the C++ code.

How can I resolve this?


The above problems were resolved via installing: python-qt4-dev libqwt-dev python-sip-dev python-dev

After successfully building PyQwt I faced a new error while running miramath

 python main.py
running...
Traceback (most recent call last):
  File "main.py", line 77, in <module>
    main(sys.argv)
  File "main.py", line 51, in main
    main = MainWindow()
  File "/home/usama/Downloads/miramath/mainwindow.py", line 55, in __init__
    self.addTab()
  File "/home/usama/Downloads/miramath/mainwindow.py", line 436, in addTab
    w = worksheet.WorkSheet(self, self.runtimeStatusMessage, self.numEquationsStatusMessage, self.currentEquationStatusMessage)
  File "/home/usama/Downloads/miramath/worksheet.py", line 94, in __init__
    self.execution_thread = execthread.ExecThread(self)
  File "/home/usama/Downloads/miramath/execthread.py", line 56, in __init__
    exec symbolics_init_program in self.symbolics_global_namespace    # execfile goes away in 3.0
  File "<string>", line 91, in <module>
AttributeError: 'module' object has no attribute 'abs'

Problem is resolved @green7 answer's below

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted
  • Open the file symbolics_init.py.
  • Go to line 91.
  • Replace sympy.abs with sympy.Abs
share|improve this answer
    
`python-qwt5-qt4 python-qwt3d-qt4 python3-ply python-ply python-sympy python-scipy python-qt4' thesee all are already installed? –  nightcrawler Apr 16 '13 at 13:12
    
Are the errors, that you mentioned, from PyQwt package or miramath? –  green7 Apr 16 '13 at 14:04
    
ok done, the errors are resolved & now I have successfully installed PyQwt package...However while running miramath splash screen occurs & terminal shows the following error...I repeat no further error from PyQwt occurs: pastebin.com/bWTqRQRU –  nightcrawler Apr 16 '13 at 16:47
    
I've modified the answer. Since the problem you're facing now is different from that in the question, I request you to please modify the question as well. :) –  green7 Apr 16 '13 at 17:37
    
Extremely thnx, as an engineer I like to run educational apps in this aspect please also make your input to: askubuntu.com/questions/279920/running-dwsim-failed –  nightcrawler Apr 16 '13 at 18:05
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.