Closed olliemay closed 6 years ago
Just tried a clean install, and it worked for me:
▶ source activate py27
▶ pip install imolecule
...
▶ python
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
>>> import imolecule.json_formatter as json
>>>
Quick sanity checks:
imolecule.py
in your working directory? That would mess with the import logic.ls /usr/local/lib/python2.7/site-packages/imolecule/
? Is json_formatter
there?pip install imolecule
?Hi Patrick,
I've uninstalled my brew python2.7 environment and install a new one using miniconda instead. Using conda as my package manger seems to have worked and has made life a lot easier!
I think there must have been an issue when I tried downloading the individual packages with pip and brew.
A bit off topic but how do I use your package on an Apache web server to display 2D structural formulas from SMILES?
Thanks again! Ollie
For your other question, have a look at the examples.
If you want to convert SMILES to JSON, you'll have to think through a few steps. First, do you want a simple file server, or are you looking for more complex?
For a simple file server, you'll have to do everything with client-side javascript. You can use something like Kekule.js, then follow one of imolecule's javascript examples to see how it all ties in.
Writing your own server is more work, but gives you more functionality. This imolecule example uses server-side libraries to handle chemical conversion.
Both approaches have their advantages, and it's ultimately up to you.
Hope this helps!
I'm having this same issue. I installed python2.7 from conda. I used conda to install openbabel (conda install openbabel) and pip2 to install imolecule (pip2 install imolecule). When I go to /anaconda2/lib/python2.7/site-packages/imolecule/ the json_formatter.py file is there. Any other suggestions?
Hi, i'm trying to use see how imolecules works in jupyter but i keep getting the following error when trying to follow you example:
Python2.7 has been installed using home brew along with Swig and jupyter. Python dependences; ipython, pybel and openbabel have all been installed using pip2.
I have uninstalled and re-installed but that doesn't appear to work - any ideas?
Cheers, Ollie