[MacPorts] #47300: Problem to import dolfin intalled on macport
#47300: Problem to import dolfin intalled on macport ----------------------------+-------------------------------- Reporter: ljofre2146@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: contrib | Version: 2.3.3 Keywords: dolfin, python | Port: dolfin ----------------------------+-------------------------------- Hello to all: my problem is for import dolfin module in a habitual project. This package was installed from macport in osx yosemite '''sudo port install dolfin''' when I try use the dolfin module I got the next message '''import dolfin as df''' Traceback (most recent call last): File "/Users/leonardojofre/Documents/mpi4py course/ejemplos petsc/example00001.py", line7, in <module> import dolfin as df File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/__init__.py", line 16, in <module> from . import cpp File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/cpp/__init__.py", line 42, in <module> exec("from . import %s" % module_name) File "<string>", line 1, in <module> ImportError: cannot import name common it is a installation problem or is a bug? thanks to all -- Ticket URL: <https://trac.macports.org/ticket/47300> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Changes (by ryandesign@…): * component: contrib => ports * priority: High => Normal * owner: macports-tickets@… => sean@… * keywords: dolfin, python => Old description:
Hello to all:
my problem is for import dolfin module in a habitual project. This package was installed from macport in osx yosemite
'''sudo port install dolfin'''
when I try use the dolfin module I got the next message
'''import dolfin as df'''
Traceback (most recent call last): File "/Users/leonardojofre/Documents/mpi4py course/ejemplos petsc/example00001.py", line7, in <module> import dolfin as df
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/__init__.py", line 16, in <module> from . import cpp
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/cpp/__init__.py", line 42, in <module> exec("from . import %s" % module_name)
File "<string>", line 1, in <module> ImportError: cannot import name common
it is a installation problem or is a bug?
thanks to all
New description: Hello to all: my problem is for import dolfin module in a habitual project. This package was installed from macport in osx yosemite {{{ sudo port install dolfin }}} when I try use the dolfin module I got the next message {{{ import dolfin as df }}} {{{ Traceback (most recent call last): File "/Users/leonardojofre/Documents/mpi4py course/ejemplos petsc/example00001.py", line7, in <module> import dolfin as df File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/__init__.py", line 16, in <module> from . import cpp File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/cpp/__init__.py", line 42, in <module> exec("from . import %s" % module_name) File "<string>", line 1, in <module> ImportError: cannot import name common }}} it is a installation problem or is a bug? thanks to all -- -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by gideon.simpson@…): Has there been any update on this? I'm finding that I get that error too, and I'm using the most recently updated dolfin on one of my machines. I get the error: {{{
import dolfin Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/__init__.py", line 16, in <module> from . import cpp File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/cpp/__init__.py", line 42, in <module> exec("from . import %s" % module_name) File "<string>", line 1, in <module> ImportError: cannot import name common }}}
-- Ticket URL: <https://trac.macports.org/ticket/47300#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by sean@…): Sorry, this fell off my radar. I'll try to reproduce locally. -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by sean@…): I can't reproduce this locally. Is this due to the structure of the python project you're using (mpi4py course)? Is that someone online where I can download and try? -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by gideon.simpson@…): Replying to [comment:5 sean@…]:
I can't reproduce this locally. Is this due to the structure of the python project you're using (mpi4py course)? Is that someone online where I can download and try?
I'm not using mpi4py. -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by sean@…): Ok, I guess I was confused by the "mpi4py course" in your path. What are the exact options you used to compile dolfin? And is the "ejemplos petsc" folder online somewhere? -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by gideon.simpson@…): I have dolfin @1.5.0_2+cgal+mpich+petsc+slepc+suitesparse installed. Not sure where I should look for ejemplos petsc. -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by sean@…): The first line of your traceback is "/Users/leonardojofre/Documents/mpi4py course/ejemplos petsc/example00001.py" ... can you run (from your home directory) `python -c 'import dolfin'` and see if that works? -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by gideon.simpson@…): The original poster was doing something with mpi4py; I am not. When I do the suggested command, I get: {{{ :~$ python -c 'import dolfin' Traceback (most recent call last): File "<string>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/__init__.py", line 16, in <module> from . import cpp File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /site-packages/dolfin/cpp/__init__.py", line 42, in <module> exec("from . import %s" % module_name) File "<string>", line 1, in <module> ImportError: cannot import name common }}} -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: | Keywords: Port: dolfin | ---------------------------+-------------------- Comment (by gideon.simpson@…): After blowing away my entire macports instllation, and reinstalling everything, it now seems to work. I still have no idea where the problem began. -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
#47300: dolfin: ImportError: cannot import name common ---------------------------+-------------------- Reporter: ljofre2146@… | Owner: sean@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.3 Resolution: worksforme | Keywords: Port: dolfin | ---------------------------+-------------------- Changes (by sean@…): * status: new => closed * resolution: => worksforme Comment: Replying to [comment:12 gideon.simpson@…]:
After blowing away my entire macports instllation, and reinstalling everything, it now seems to work. I still have no idea where the problem began.
My best guess is that something installed some python package that conflicted with dolfin :-/ Glad it's working now :-) -- Ticket URL: <https://trac.macports.org/ticket/47300#comment:13> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts