pyNastran 0.4.1 install bug

48 views
Skip to first unread message

steve

unread,
Jul 26, 2012, 10:35:44 PM7/26/12
to pynastra...@googlegroups.com
A user asked this...

Hy Steve,
 
I'm triyng to install the script but I have an error when I use the command python setup.py test.
What is it wrong ?
 
many thanks
 
 
 
Under you can see the out from the command line:
 
 
 linux-mb1:/home/max/Scaricati/pyNastran # python setup.py develop
('version = ', sys.version_info(major=2, minor=7, micro=0, releaselevel='final', serial=0))
running develop
Checking .pth file support in /usr/local/lib/python2.7/site-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/site-packages/ appears to support .pth files
running egg_info
writing requirements to pyNastran.egg-info/requires.txt
writing pyNastran.egg-info/PKG-INFO
writing top-level names to pyNastran.egg-info/top_level.txt
writing dependency_links to pyNastran.egg-info/dependency_links.txt
writing entry points to pyNastran.egg-info/entry_points.txt
reading manifest file 'pyNastran.egg-info/SOURCES.txt'
writing manifest file 'pyNastran.egg-info/SOURCES.txt'
running build_ext
Creating /usr/local/lib/python2.7/site-packages/pyNastran.egg-link (link to .)
Adding pyNastran 0.4.1 to easy-install.pth file
Installing test_bdf script to /usr/local/bin
Installing test_op2 script to /usr/local/bin
Installing test_f06 script to /usr/local/bin
Installing pyNastranGUI script to /usr/local/bin

Installed /home/max/Scaricati/pyNastran
Processing dependencies for pyNastran==0.4.1
Searching for scipy==0.10.1
Best match: scipy 0.10.1
Adding scipy 0.10.1 to easy-install.pth file

Using /usr/lib64/python2.7/site-packages
Searching for numpy==1.6.1
Best match: numpy 1.6.1
Adding numpy 1.6.1 to easy-install.pth file

Using /usr/lib64/python2.7/site-packages
Finished processing dependencies for pyNastran==0.4.1

 
 linux-mb1:/home/max/Scaricati/pyNastran # python setup.py test
('version = ', sys.version_info(major=2, minor=7, micro=0, releaselevel='final', serial=0))
running test
running egg_info
writing requirements to pyNastran.egg-info/requires.txt
writing pyNastran.egg-info/PKG-INFO
writing top-level names to pyNastran.egg-info/top_level.txt
writing dependency_links to pyNastran.egg-info/dependency_links.txt
writing entry points to pyNastran.egg-info/entry_points.txt
reading manifest file 'pyNastran.egg-info/SOURCES.txt'
writing manifest file 'pyNastran.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 49, in <module>
    test_suite = 'pyNastran.all_tests',
  File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 121, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 101, in with_project_on_sys_path
    func()
  File "/usr/lib/python2.7/site-packages/setuptools/command/test.py", line 130, in run_tests
    testLoader = loader_class()
  File "/usr/lib64/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib64/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib64/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib64/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib64/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'all_tests'

steve

unread,
Jul 26, 2012, 10:36:15 PM7/26/12
to pynastra...@googlegroups.com
I've had that happen a few times, not really sure why it happens, but
there's an easy work around...

python setup.py develop
cd pyNastran
python all_tests.py

Also make sure you're running the right version.  The bug might be
caused by overwriting a previous version in site-packages.
python
import pyNastran
print pyNastran.__version__

It should say 0.4.1.  Let me know if it doesn't work properly.

Steve 

steve

unread,
Jul 26, 2012, 10:36:56 PM7/26/12
to pynastra...@googlegroups.com
 Dear Steven,
 
I have tried also  python all_tests.py, but it didn't run, because missed the wave module of scipy.
 
I had install this module, updated with some patch from science repository of Opensuse 11.4 x86.64
and now pyNastran 0.4.1. run fine.
 
Now, I'll try to use it.
 
thanks 

steve

unread,
Jul 26, 2012, 10:42:25 PM7/26/12
to pynastra...@googlegroups.com
Scipy.weave is a very strange module.   Scipy.weave is for embedding pure C code in Python, which is not even done in pyNastran.  It's actually only in pyNastran because pyNastran uses sparse matrices, which if you use sparse matrices without importing scipy.weave will erroneously return an error code of 0 if Python crashes.  How this happens is beyond me, but scipy.weave magically fixes the bug.

If enough people bug the scipy developers it might get fixed.

Reply all
Reply to author
Forward
0 new messages