Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use on Ubuntu #26

Open
bergwerf opened this issue Oct 22, 2016 · 1 comment
Open

Unable to use on Ubuntu #26

bergwerf opened this issue Oct 22, 2016 · 1 comment

Comments

@bergwerf
Copy link

bergwerf commented Oct 22, 2016

When installing via pip, there is an error saying that it cannot import utils, e.g. from nbmolviz import utils. When I install from source, I get this error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-fbf31e3efb44> in <module>()
----> 1 import nbmolviz
      2 import pybel
      3 benzene = pybel.read_string('smi','c1cccc1').next()
      4 nbmolviz.visualize(benzene)

/home/herman/repos/universe/notebook-molecular-visualization/nbmolviz/__init__.py in <module>()
     16 
     17 from nbmolviz import utils
---> 18 from nbmolviz import base_widget, widget3d, interfaces3d, drivers3d, widget2d
     19 
     20 # package metadata

/home/herman/repos/universe/notebook-molecular-visualization/nbmolviz/drivers3d.py in <module>()
     16 from traitlets import Bool, Dict, Float, List, Set, Unicode
     17 
---> 18 from moldesign import units as u
     19 
     20 from nbmolviz.utils import JSObject, translate_color

/usr/local/lib/python2.7/dist-packages/moldesign/__init__.pyc in <module>()
     26 from . import utils
     27 from . import units
---> 28 from . import uibase
     29 from . import widgets
     30 

/usr/local/lib/python2.7/dist-packages/moldesign/uibase/__init__.py in <module>()
      4 __all__ = []
      5 
----> 6 from .selector import *
      7 from .components import *
      8 from .plotting import *

/usr/local/lib/python2.7/dist-packages/moldesign/uibase/selector.py in <module>()
     16 
     17 import moldesign as mdt
---> 18 from moldesign import utils, viewer
     19 
     20 

/usr/local/lib/python2.7/dist-packages/moldesign/viewer/__init__.py in <module>()
      6 from .common import *
      7 from .viewer2d import *
----> 8 from .viewer3d import *
      9 from .bondclicker import *

/usr/local/lib/python2.7/dist-packages/moldesign/viewer/viewer3d.py in <module>()
     21 from moldesign import utils
     22 from moldesign.helpers import VolumetricGrid, colormap
---> 23 from nbmolviz.drivers3d import MolViz_3DMol
     24 from . import toplevel, ColorMixin
     25 

ImportError: cannot import name MolViz_3DMol

I have a slightly messed up environment with previous attempts using conda to install chemview and nglview. But AFAIK there is nothing that could affect this. I'm running Ubuntu 16.04

@avirshup
Copy link
Contributor

Hi @hermanbergwerf - thanks for your interest, and sorry for the difficulties in getting nbmolviz installed! I believe the specific issue you're seeing comes from a circular import that's getting fixed in #28.

As a note of caution, though - this code is in the middle of a pretty big overhaul (see #19), which involves some weird interdependencies between our python and javascript libraries. Unfortunately, while this is happening, it will actually be pretty difficult to set up an nbmolviz dev environment.

If you're specifically interested in playing around with the nbmolviz code right now, I'd highly recommend branching from the last stable release - that's commit 57733c3.

If you're more interested in the underlying javascript libraries, those are probably a little more stable - they're at https://github.com/Autodesk/molecule-3d-for-react and https://github.com/Autodesk/molecule-2d-for-react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants