drrelyea / spgl1

Port of SPGL1 to python
GNU Lesser General Public License v2.1
45 stars 29 forks source link

Import error after successful installation #8

Closed Orcuslc closed 5 years ago

Orcuslc commented 6 years ago

Hi! I successfully installed spgl1 by sudo pip3 install -e ., but when I tried to import spgl1 in ipython3, there comes up with an Impor Error:

In [1]: import spgl1
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-e139a9bb13b4> in <module>()
----> 1 import spgl1

~/tmp/SPGL1_python_port/spgl1/__init__.py in <module>()
----> 1 from spgl1 import spgl1, spg_bp, spg_bpdn, spg_lasso, spg_mmv
      2 from spgl_aux import spgSetParms

ImportError: cannot import name 'spg_bp'

My environment is: Ubuntu 16.04LTS, Python 3.5.2, pip 8.1.1, ipython3 6.2.1. Wondering if this is not compatible with Python 3.5.

mrava87 commented 5 years ago

Hi, the code changed quite a lot in the last couple of weeks. Once the pull request is accepted would you try again and see if your error persists.

Try what you posted on the new version you should get this:

In [1]: import spgl1

In [2]: spgl1.spg_bp                                                            
Out[2]: <function spgl1.spgl1.spg_bp(A, b, **kwargs)>
mrava87 commented 5 years ago

@drrelyea, I assume this is fixed and we haven’t got any reply. Can you please close it