I use the following "monkey patch" to get around this problem. Just include these lines at the top of your FiPy script.
import fipy fipy.meshes.gmshMesh._gmshVersion = lambda **kwargs : 2.0 On Mon, Feb 8, 2016 at 3:53 PM, Guyer, Jonathan E. Dr. <[email protected]> wrote: > You can either download an older gmsh version or you can fetch a recent copy > of our develop branch from github repo, if you're comfortable with that. > > > On Feb 8, 2016, at 4:20 PM, Daniel DeSantis <[email protected]> wrote: > >> So, some of that information and a little research on my own helped. For >> some reason the PATH wasn't reading into the gmsh folder. By adding the >> folder with the gmsh executable into the path, I was able to get it to read. >> Just FYI, for anyone who might need it, I used this little guide >> >> http://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows-7 >> >> When I type gmsh --version into the command window, I get 2.11.0 >> >> Of course, now I'm getting a ValueError saying that 2.11.0 is an invalid >> version number. >> >> Maybe I should download and try an older gmsh version? I will probably play >> with this some more unless you have any ideas? >> >> I'll post updates just in case anyone else ever runs into these problems. >> >> On Mon, Feb 8, 2016 at 3:51 PM, Guyer, Jonathan E. Dr. >> <[email protected]> wrote: >> Strange. I sort of understand what this error message means, but I don't >> understand why it's never been a problem before. >> >> On Feb 5, 2016, at 12:26 PM, Daniel DeSantis <[email protected]> wrote: >> >> > Dr. Guyer, >> > >> > Thanks for the advice. It seemed to solve the error. Unfortunately, >> > another one cropped up immediately. Sorry to be a bother but I have to >> > ask, have you seen any errors come up regarding a NameError on factory >> > meshes? >> > >> > >> > File "<ipython-input-4-44aa13cad657>", line 1, in <module> >> > >> > runfile('C:/Users/ddesantis/Dropbox/PythonScripts/FiPy/Diffusion_Circle.py', >> > wdir='C:/Users/ddesantis/Dropbox/PythonScripts/FiPy') >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", >> > line 699, in runfile >> > execfile(filename, namespace) >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", >> > line 74, in execfile >> > exec(compile(scripttext, filename, 'exec'), glob, loc) >> > >> > File >> > "C:/Users/ddesantis/Dropbox/PythonScripts/FiPy/Diffusion_Circle.py", line >> > 7, in <module> >> > from fipy import * >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\__init__.py", >> > line 45, in <module> >> > from fipy.boundaryConditions import * >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\boundaryConditions\__init__.py", >> > line 2, in <module> >> > from fipy.boundaryConditions.fixedFlux import * >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\boundaryConditions\fixedFlux.py", >> > line 40, in <module> >> > from fipy.boundaryConditions.boundaryCondition import BoundaryCondition >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\boundaryConditions\boundaryCondition.py", >> > line 38, in <module> >> > from fipy.variables.variable import Variable >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\variables\__init__.py", >> > line 11, in <module> >> > from fipy.variables.histogramVariable import * >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\variables\histogramVariable.py", >> > line 38, in <module> >> > from fipy.meshes import Grid1D >> > >> > File >> > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\meshes\__init__.py", >> > line 9, in <module> >> > __all__.extend(factoryMeshes.__all__) >> > >> > NameError: name 'factoryMeshes' is not defined >> > >> > On Fri, Feb 5, 2016 at 11:30 AM, Guyer, Jonathan E. Dr. >> > <[email protected]> wrote: >> > I would guess that you've run into the problem in >> > https://github.com/usnistgov/fipy/issues/462 >> > >> > We fixed this last summer, but haven't pushed a new release since then >> > (sorry about that). >> > >> > If you check out the `develop` branch from our repository, I think that >> > will correct this problem. >> > >> > If not, tell us what you get if you type `gmsh --version` at the command >> > line. >> > >> > >> > On Feb 5, 2016, at 8:59 AM, Daniel DeSantis <[email protected]> wrote: >> > >> > > Hello, >> > > >> > > I am trying to run FiPy on a Windows XP system. I have gmsh installed on >> > > my system. Does gmsh need to be in a certain file location? >> > > >> > > If I try to run commands with the Gmsh interface commands, such as >> > > Gmsh2D(), I receive the following error. >> > > >> > > File "<ipython-input-1-44aa13cad657>", line 1, in <module> >> > > >> > > runfile('C:/Users/ddesantis/Dropbox/PythonScripts/FiPy/Diffusion_Circle.py', >> > > wdir='C:/Users/ddesantis/Dropbox/PythonScripts/FiPy') >> > > >> > > File >> > > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", >> > > line 699, in runfile >> > > execfile(filename, namespace) >> > > >> > > File >> > > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", >> > > line 74, in execfile >> > > exec(compile(scripttext, filename, 'exec'), glob, loc) >> > > >> > > File >> > > "C:/Users/ddesantis/Dropbox/PythonScripts/FiPy/Diffusion_Circle.py", >> > > line 26, in <module> >> > > ''' % locals()) >> > > >> > > File >> > > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\meshes\gmshMesh.py", >> > > line 1578, in __init__ >> > > background=background) >> > > >> > > File >> > > "C:\Users\ddesantis\AppData\Local\Continuum\Anaconda2\lib\site-packages\fipy\meshes\gmshMesh.py", >> > > line 151, in openMSHFile >> > > raise EnvironmentError("Gmsh version must be >= 2.0.") >> > > >> > > EnvironmentError: Gmsh version must be >= 2.0. >> > > >> > > Any advice? >> > > >> > > Thank you, >> > > >> > > Dan >> > > >> > > >> > > _______________________________________________ >> > > fipy mailing list >> > > [email protected] >> > > http://www.ctcms.nist.gov/fipy >> > > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >> > >> > >> > _______________________________________________ >> > fipy mailing list >> > [email protected] >> > http://www.ctcms.nist.gov/fipy >> > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >> > >> > >> > >> > -- >> > Daniel DeSantis >> > >> > >> > _______________________________________________ >> > fipy mailing list >> > [email protected] >> > http://www.ctcms.nist.gov/fipy >> > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >> >> >> _______________________________________________ >> fipy mailing list >> [email protected] >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] >> >> >> >> -- >> Daniel DeSantis >> >> >> _______________________________________________ >> fipy mailing list >> [email protected] >> http://www.ctcms.nist.gov/fipy >> [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > _______________________________________________ > fipy mailing list > [email protected] > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
