gabrielelanaro / chemview

The new generation molecular viewer for IPython notebook
GNU Lesser General Public License v2.1
81 stars 17 forks source link

Unable to install on Ubuntu #37

Closed bergwerf closed 7 years ago

bergwerf commented 7 years ago

I am unable to install chemview.

When I follow the conda instructions:

The notebook is not quite working after this installation: screenshot from 2016-10-15 20-46-46 screenshot from 2016-10-15 20-47-57

I don't know if this is exclusively related to Python 3.

When I clone the repo and install the package locally, I get this error:

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
    npm WARN jupyter-widget-chemview@0.0.1 No license field.
    rebuilding js and css failed
    missing files: ['/tmp/pip-67vQhC-build/chemview/static/extension.js', '/tmp/pip-67vQhC-build/chemview/static/index.js']
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-67vQhC-build/setup.py", line 170, in <module>
        setup(**setup_args)
      File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/tmp/pip-67vQhC-build/setup.py", line 45, in run
        raise e
    ValueError: Missing file: /tmp/pip-67vQhC-build/chemview/static/extension.js

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-67vQhC-build/

I'm on Ubuntu 16.10. The only python thing that is probably non-standard is that I have python and pip as alias for python3 and pip3.

gabrielelanaro commented 7 years ago

It looks like new and old versions of chemview got mixed up. The version in conda is out of date, I'll work on a new version this week.

Try these new instructions to setup a clean environment:

conda create -n issue-37 python=3
source activate issue-37
git clone git@github.com:gabrielelanaro/chemview.git

conda install notebook numpy numba jupyter
pip install vapory
cd chemview
pip install .

# This basically reloads the environment so that it picks up the new "jupyter" executable
source deactivate 
source activate issue-37

jupyter nbextension enable widgetsnbextension --user --py
jupyter nbextension install --user --py --symlink chemview
jupyter nbextension enable --py --user chemview

jupyter notebook

Now you should be able to test the QuickStart notebook.py

bergwerf commented 7 years ago

Unfortunately I get the same error (ValueError: Missing file: /tmp/pip-xxxxxxxx-build/chemview/static/extension.js)

gabrielelanaro commented 7 years ago

I think the problem could be that it fails to compile the JS extensions:

    npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
    npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
    rebuilding js and css failed

And since it fails, pip can't find the compiled JS file extensions.js. I'll make a conda package so that the js extensions come precompiled. Hopefully that'll solve the issue.

In the meantime I attach a .whl file maybe that'll work. Change the extension from .zip to .whl (Github won't let me upload files with .whl extension but only .zip) chemview-0.1.0.dev0-py2.py3-none-any.zip

Also you won't need the --symlink option in this command:

jupyter nbextension install --user --py --symlink chemview
gabrielelanaro commented 7 years ago

I made the conda package for chemview. You can now test:

conda install -c gabrielelanaro chemview
hainm commented 7 years ago

@gabrielelanaro your new conda update works for me. May be you should remove 'enable_notebook' in your files too?

gabrielelanaro commented 7 years ago

@hainm Absolutely

bergwerf commented 7 years ago

I think it works for me now. Although many examples in the /notebooks directory don't work because they rely on other modules that are not present.

gabrielelanaro commented 7 years ago

@hermanbergwerf great! chemview only handles the graphics part, other functionalities (like parsing, simulating etc) are better handled by other software. Examples are meant to show how to integrate these other packages with chemview.