Calysto / calysto_processing

Calysto Processing kernel for Jupyter
55 stars 7 forks source link

ImportError: No module named 'metakernel.utils.kernel' #8

Closed pmvr closed 7 years ago

pmvr commented 7 years ago

Hi there,

unfortunately, I failed to install calysto_processing, see file attached. It seems, that there is something wrong with metakernel, which I have successfully installed by pip3 install metakernel --upgrade

It would be great if someone has a hint what went wrong.

calysto-processing.txt

pmvr commented 7 years ago

With version 0.16.0 of metakernel installation of calysto_processing can be done.

danielmartinez commented 7 years ago

Hi,

I can't install the calysto_processing kernel even with that version, can you post the versions of the dependencies that you installed? I'm trying to build a jupyter/nbviewer docker container with processing kernel installed, but I think there are package version conflicts at my requirements.txt file, as it drops the same error that yours, even if I force metakernel version to 0.16.0

Any hint?

log.txt requirements.txt

misolietavec commented 7 years ago

There is no metakernel.utils.kernel in current metakernel. The setup.py in calysto_processing is thus incompatible with current state of metakernel. I read some remarks in metakernel repository, after that I was able to install calysto_processing module (python3 setup.py install) with simplified setup.py:

 from distutils.core import setup

setup(name='calysto_processing',
      version='2.0.2',
      description='A ProcessingJS kernel for Jupyter',
      url="https://github.com/Calysto/calysto_processing",
      author='Douglas Blank',
      author_email='doug.blank@gmail.com',
      install_requires=["metakernel", "html2text"],
      packages=["calysto_processing"],
      classifiers = [
          'Framework :: IPython',
          'License :: OSI Approved :: BSD License',
          'Programming Language :: Python :: 3',
          'Programming Language :: Python :: 2',
          'Topic :: System :: Shells',
      ]
)

After that I also made the kernel.json file in /usr/local/share/jupyter/kernels/calysto_processing

{
    "argv": ["/usr/bin/python3",
         "-m", "calysto_processing",
         "-f", "{connection_file}"],
    "display_name": "Calysto Processing",
    "language": "java",
    "name": "calysto_processing",
    "env": {"PROCESSING_JAVA": "/opt/processing/processing-java"}
}

I am sure that based on those remarks, the developers will be able to properly update setup.py for calysto_processing. The sample notebook (Calysto Processing.ipynb) works like a charm (I have downloaded Processing 3.3 from processing.org).

dsblank commented 7 years ago

Thanks for the feedback! This will help bring the setup up to date.

misolietavec commented 7 years ago

@dsblank: After closing the issue in Calysto/metakernel, I am sure you can make the due changes here. Seems, the development is stalled, but this change will make Calysto Processing usable with newer metakernel and Processing. I am not going to make PR, because my abovementioned workound is not general enough and I do not have sufficient knowledge to make qualified decisions.

dsblank commented 7 years ago

The development isn't stalled, but time to fix this is limited. I'll try to bring the setup.py up to the modern metakernel install methods in the next month or so, if someone doesn't provide a PR first.

dsblank commented 7 years ago

Should be fixed with latest updates. To install:

1. pip3 install calysto_processing --update --user
2. python3 -m caysto_processing install --user
3. Install Processing (say, put it in /opt/)
4. export PROCESSING_JAVA=/home/dblank/Desktop/processing-3.3.3/processing-java
5. jupyter notebook
6. select "Calysto Processing"