Hi Carlos,

Thank you for answering my plea. The short answer is No, I have not succeeded 
in running PyMetis yet.

I have an iMac with OS X 10.10.2 installed and am currently running Spyder2 on 
both the iMac and on a Parallels virtual machine with Windows 7.  I have other 
python code running on both instances of Spyder.

I asked Andreas Kloeckner for guidance on how to install Pymetis and he sent me 
the following

> Here are some generic instructions (that are for a different
> package but should work with minor adaptations):
> 
> http://documen.tician.de/pyublas/installing.html 
> <http://documen.tician.de/pyublas/installing.html>
I tried to follow the instructions and have managed to create directories in 
/Users/cbhe/Documents/"Python User Files 2015" containing what appears to be 
the full software. Below are the contents of those directories. In the interim 
I decided to run Spyder from Windows as I had concluded that getting PyMetis to 
run from the terminal window was beyond my current capabilities.

/Users/cbhe/Documents/Python User Files 2015/PyMetis-2014.1
total 192
 8 -rw-r--r--@ 1 cbhe  staff   1829 12 Sep 05:53 LICENSE
 8 -rw-r--r--@ 1 cbhe  staff    391 12 Sep 12:11 MANIFEST.in
 8 -rw-r--r--@ 1 cbhe  staff    225  8 Jun  2013 Makefile.in
 8 -rw-r--r--@ 1 cbhe  staff   2182 12 Sep 12:36 PKG-INFO
 0 drwxr-xr-x@ 8 cbhe  staff    272 26 Jan 14:25 PyMetis.egg-info
 8 -rw-r--r--@ 1 cbhe  staff    310 12 Sep 05:53 README
 8 -rw-r--r--@ 1 cbhe  staff    754 12 Sep 12:23 README.rst
 8 -rw-r--r--  1 cbhe  staff   1090 12 May  2014 README_SETUP.txt
56 -rw-r--r--@ 1 cbhe  staff  26083 12 May  2014 aksetup_helper.py
56 -rw-r--r--  1 cbhe  staff  26724 20 Jan 20:42 aksetup_helper.pyc
 0 drwxr-xr-x@ 4 cbhe  staff    136 21 Jan 10:43 bpl-subset
 8 -rwxr-xr-x@ 1 cbhe  staff     91 12 May  2014 configure.py
 0 drwxr-xr-x@ 3 cbhe  staff    102 12 Sep 12:36 pymetis
 8 -rw-r--r--@ 1 cbhe  staff    134 12 Sep 12:36 setup.cfg
 8 -rw-r--r--@ 1 cbhe  staff   3606 12 Sep 12:22 setup.py
 0 drwxr-xr-x@ 5 cbhe  staff    170 21 Jan 10:34 src
 0 drwxr-xr-x@ 4 cbhe  staff    136 29 Jan 21:39 test

16 -rw-r--r--@  1 cbhe  staff   6512  8 Jun  2013 LICENSE
 8 -rw-r--r--@  1 cbhe  staff    568 11 Jun  2013 MANIFEST.in
 8 -rw-r--r--   1 cbhe  staff    524 29 Jan 20:39 Makefile
 8 -rw-r--r--@  1 cbhe  staff    337  8 Jun  2013 Makefile.in
 0 drwxr-xr-x@  7 cbhe  staff    238  7 Jul  2014 MeshPy.egg-info
 8 -rw-r--r--@  1 cbhe  staff   2613  7 Jul  2014 PKG-INFO
 8 -rw-r--r--   1 cbhe  staff   3117  8 Jun  2013 README
 8 -rw-r--r--@  1 cbhe  staff   1291 14 Jun  2014 README.rst
 8 -rw-r--r--@  1 cbhe  staff   1090 12 May  2014 README_SETUP.txt
56 -rw-r--r--@  1 cbhe  staff  26083 14 Jun  2014 aksetup_helper.py
56 -rw-r--r--   1 cbhe  staff  26724 20 Jan 20:56 aksetup_helper.pyc
 0 drwxr-xr-x@  4 cbhe  staff    136 20 Jan 19:08 bpl-subset
 8 -rwxr-xr-x@  1 cbhe  staff     91 12 May  2014 configure.py
 0 drwxr-xr-x@  3 cbhe  staff    102  7 Jul  2014 doc
 0 drwxr-xr-x@  3 cbhe  staff    102  7 Jul  2014 examples
 0 drwxr-xr-x@ 16 cbhe  staff    544 29 Jan 20:13 meshpy
 8 -rw-r--r--@  1 cbhe  staff    134  7 Jul  2014 setup.cfg
16 -rw-r--r--@  1 cbhe  staff   4494 14 Jun  2014 setup.py
 8 -rw-r--r--   1 cbhe  staff   3918 20 Jan 20:59 setup.pyc
 8 -rw-r--r--   1 cbhe  staff    167 29 Jan 20:39 siteconf.py
 0 drwxr-xr-x@  4 cbhe  staff    136 25 Jan 22:26 src
 0 drwxr-xr-x@  3 cbhe  staff    102 29 Jan 20:52 test
/Users/cbhe/Documents/Python User Files 2015/MeshPy-2014.1

I have the run setup programs for both the PyMetis and MeshPy packages and (I 
think) these ran correctly.

When I run a “reduced" version test_metis.py (below) with embedded print 
statements

 import numpy as np
    print "line 2"
    from math import pi, cos, sin
    print "Line 3"
    from meshpy.tet import MeshInfo, build
    print "line 4"
    from meshpy.geometry import \
            GeometryBuilder, generate_surface_of_revolution, EXT_CLOSED_IN_RZ
    print "line 5"
    big_r = 3
    little_r = 1.5
    
    print "big_r = ", big_r

I get the following returned

----------------------------------

runfile('Y:/Documents/Python User Files 
2015/PyMetis-2014.1/test/reduced_test_metis.py', wdir='Y:/Documents/Python User 
Files 2015/PyMetis-2014.1/test')
Line 1
line 2
Line 3
Traceback (most recent call last):

  File "<ipython-input-1-2f1f067ddd14>", line 1, in <module>
    runfile('Y:/Documents/Python User Files 
2015/PyMetis-2014.1/test/reduced_test_metis.py', wdir='Y:/Documents/Python User 
Files 2015/PyMetis-2014.1/test')

  File 
"C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 601, in runfile
    execfile(filename, namespace)

  File 
"C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 66, in execfile
    exec(compile(scripttext, filename, 'exec'), glob, loc)

  File "Y:/Documents/Python User Files 
2015/PyMetis-2014.1/test/reduced_test_metis.py", line 71, in <module>
    main()

  File "Y:/Documents/Python User Files 
2015/PyMetis-2014.1/test/reduced_test_metis.py", line 7, in main
    from meshpy.tet import MeshInfo, build

  File "\\psf\Home\Documents\Python User Files 
2015\MeshPy-2014.1\meshpy\tet.py", line 2, in <module>
    import meshpy._tetgen as internals

ImportError: No module named _tetgen

-------------------------------

When I run test_mesh.py I get

-----------------------------

runfile('Y:/Documents/Python User Files 
2015/MeshPy-2014.1/test/test_meshpy.py', wdir='Y:/Documents/Python User Files 
2015/MeshPy-2014.1/test')
Reloaded modules: meshpy, meshpy.common
Traceback (most recent call last):

  File "<ipython-input-4-d151e4026252>", line 1, in <module>
    runfile('Y:/Documents/Python User Files 
2015/MeshPy-2014.1/test/test_meshpy.py', wdir='Y:/Documents/Python User Files 
2015/MeshPy-2014.1/test')

  File 
"C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 601, in runfile
    execfile(filename, namespace)

  File 
"C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py",
 line 66, in execfile
    exec(compile(scripttext, filename, 'exec'), glob, loc)

  File "Y:/Documents/Python User Files 2015/MeshPy-2014.1/test/test_meshpy.py", 
line 216, in <module>
    main([__file__])

TypeError: 'NoneType' object is not callable

——————————————

At this point I am at a loss as to what to do next, and would very much 
appreciate any pointers/help/guidance.

Best regards

Chris











> On 30 Jan 2015, at 12:23 am, Carlos Córdoba <[email protected]> wrote:
> 
> Hi,
> 
> A couple of questions:
> 
> 1. Have you successfully ran PyMetis outside Spyder?
> 
> 2. How did you install PyMetis?
> 
> Cheers,
> Carlos
> 
> El 29/01/15 a las 04:28, Chris escribió:
>> Hi,
>> 
>> I am trying to install and run PyMetis from within Spyder and am having 
>> trouble importing from PyMesh.
>> If anyone successfully achieved an execution of PyMetis from within Spyder I 
>> would be exceedingly grateful to hear if there are any traps that I might be 
>> missing. I suspect Paths may be a problem but am not sure.
>> I have spent many hours spinning my wheels in what seems to me to be a Unix 
>> jungle when all I want to do is partition graphs.
>> 
>> Chris
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "spyder" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <mailto:[email protected]>.
>> To post to this group, send email to [email protected] 
>> <mailto:[email protected]>.
>> Visit this group at http://groups.google.com/group/spyderlib 
>> <http://groups.google.com/group/spyderlib>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "spyder" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/spyderlib/zFe6V43Gkqk/unsubscribe 
> <https://groups.google.com/d/topic/spyderlib/zFe6V43Gkqk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/spyderlib 
> <http://groups.google.com/group/spyderlib>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to