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

conda package fails on windows #5720

Closed
scottdraves opened this issue Jul 21, 2017 · 25 comments
Closed

conda package fails on windows #5720

scottdraves opened this issue Jul 21, 2017 · 25 comments

Comments

@scottdraves
Copy link
Contributor

CondaVerificationError: The package for beakerx located at C:\Aconda3\pkgs\beake
rx-0.1.0.dev0-py35h5a3ff1a_0
appears to be corrupted. The path 'Scripts/.beakerx-post-link-script.py'
specified in the package manifest cannot be found. 
@vitorcurtis
Copy link

I got the same error, but I could install with pip:

pip install beakerx
jupyter nbextension install beakerx --py --sys-prefix
jupyter nbextension enable beakerx --py --sys-prefix

@scottdraves
Copy link
Contributor Author

thx good to know.

@altavir
Copy link

altavir commented Aug 2, 2017

Yes, installation process completed, but I don't see new kernels in jupyter.

@scottdraves
Copy link
Contributor Author

scottdraves commented Aug 2, 2017

altavir, can you install the kernels with something like:

jupyter kernelspec install --sys-prefix --replace --name clojure /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/clojure
jupyter kernelspec install --sys-prefix --replace --name groovy /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/groovy
jupyter kernelspec install --sys-prefix --replace --name java /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/java
jupyter kernelspec install --sys-prefix --replace --name kotlin /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/kotlin
jupyter kernelspec install --sys-prefix --replace --name scala /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/scala
jupyter kernelspec install --sys-prefix --replace --name sql /Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/sql

of course adjust the paths match the location of your conda env.

@altavir
Copy link

altavir commented Aug 2, 2017

The path seems different for me:

C:\Anaconda\Lib\site-packages\beakerx\static\kernel\groovy\

But I still can't start the kernel:

[I 19:03:51.824 NotebookApp] Kernel started: 17f79752-9790-4c2e-a04b-ba2fdfff9578
Error: Could not find or load main class com.twosigma.beakerx.groovy.kernel.Groovy

Also tried to do the same with installation inside Python 3.5 environment (via cmd, since activate won't work in powershell), but it does not show groovy kernell at all in Jupyter.

@altavir
Copy link

altavir commented Aug 2, 2017

Oops, missing kernel inside environment was my mistake. But when I fixed it, I still get missing class exception.

@scottdraves
Copy link
Contributor Author

can you paste the contents of the kernel.json for groovy here please?

@altavir
Copy link

altavir commented Aug 2, 2017

Here you are:

{
  "argv": [
    "java", "-cp", "__PATH__", "com.twosigma.beakerx.groovy.kernel.Groovy",  "{connection_file}"
  ],
  "display_name": "Groovy",
  "language": "groovy",
  "env": {
    "PS1": "groovy>"
  }
}

After manipulations you proposed it is located in C:\Anaconda\share\jupyter\kernels\groovy\

@scottdraves
Copy link
Contributor Author

__PATH__ needs to be replaced with the directories that have the jars. For me thats:

/Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/base/lib/*:/Users/spot/anaconda/envs/testx/lib/python3.5/site-packages/beakerx/static/kernel/groovy/lib/*

@altavir
Copy link

altavir commented Aug 2, 2017

OK, I changed it to

{
  "argv": [
    "java", "-cp", "C:/Anaconda/share/jupyter/nbextensions/beakerx/kernel/groovy/lib/*;C:/Anaconda/share/jupyter/nbextensions/beakerx/kernel/base/lib/*", "com.twosigma.beakerx.groovy.kernel.Groovy",  "{connection_file}"
  ],
  "display_name": "Groovy",
  "language": "groovy",
  "env": {
    "PS1": "groovy>"
  }
}

and now it works. I had to use linux style slashes (probably escaped backslashes would also work) and Windows style path separator ;. I am not sure, why required kernel files exist in nbextensions\beakerx\kernel\, Lib\site-packages\beakerx\static\kernel and in kernels` directory. It seems to be very wasteful to have all of the libs three times instead of one. You don't even seem to use anything but one copy.

I am looking forward to stable Windows distribution.

@scottdraves
Copy link
Contributor Author

cool thx. not sure what files you mean, can you report full paths to the files?

@altavir
Copy link

altavir commented Aug 2, 2017

Yes of course, but they seem to be different on Linux and Windows.
First I have all of the kernels with libraries here: Anaconda\Lib\site-packages\beakerx\static\kernel\
Then I have exact copy of static directory here: C:\Anaconda\share\jupyter\nbextensions\beakerx\ including all of the kernels in C:\Anaconda\share\jupyter\nbextensions\beakerx\kernel\. And finally I have kernels with libraries here: C:\Anaconda\share\jupyter\kernels\ (for now only one kernel since I've installed only groovy). Maybe something is left from previous installations, but it does not look so.

I believe that at least libraries in jupyter/beakerx/kernels are never used. You don't even seem to call it. The ones in nbextensions are probably used for autotranslation. It still does not make sense to have two complete copies.

@scottdraves
Copy link
Contributor Author

indeed, thx: #5781

@rbidas
Copy link
Contributor

rbidas commented Aug 11, 2017

When package is build on windows, and use code from PR #5797 all is OK.
Build is fine and after local install, all kernels are in Jupyter.

@altavir
Copy link

altavir commented Aug 11, 2017

Not sure what code do you mean.
By the way I don't know why one needs python 3.5. Pip installation works quite fine with 3.6. It is a bit annoying to create additional environment.

@gnestor
Copy link
Contributor

gnestor commented Aug 11, 2017

Pip installation works quite fine with 3.6. It is a bit annoying to create additional environment.

Good to know! I haven't tested with 3.6 yet. The new instructions in #5797 do not involve creating a conda environment, just a simple pip install beakerx and then installing/enabling the notebook extension 👍

@altavir
Copy link

altavir commented Aug 11, 2017

Conda installation still asks for 3.5 and I still get an error (a new one):

CondaVerificationError: The package for beakerx located at C:\Anaconda\pkgs\beakerx-0.1.0.dev0-py35h5a3ff1a_0
appears to be corrupted. The path 'Scripts/.beakerx-pre-unlink-script.py'
specified in the package manifest cannot be found.

Pip installation works on 3.6.1 with manual kernel installation and kernel descriptor modification. It will be quite hard to explain manual modification to students, so I am still waiting for out-of-the-box installation with great anticipation.

@gnestor
Copy link
Contributor

gnestor commented Aug 15, 2017

@altavir We just merged #5797, can you try installing now?

pip install beakerx

@altavir
Copy link

altavir commented Aug 16, 2017

@gnestor installation is successful and I can use beaker from python, but kernels are not installed and path in them is still broken.

@altavir
Copy link

altavir commented Aug 18, 2017

Tried the last one. It is finally installs everything an seems to even avoid duplicate jars.
The only problem is that paths in kernel specifications use DOS directory separator \ which is treated as an escape sequence by python. You need to either use linux / slash separator (which works just fine on Windows) or use escaped backslash \\.

@scottdraves
Copy link
Contributor Author

scottdraves commented Aug 18, 2017 via email

@scottdraves
Copy link
Contributor Author

try 0.2.4 with pip (https://pypi.org/project/beakerx/)

pip install beakerx
beakerx-install

@scottdraves scottdraves added this to the 0.2 milestone Aug 20, 2017
@scottdraves scottdraves removed this from the 0.1 milestone Aug 20, 2017
@altavir
Copy link

altavir commented Aug 20, 2017

He is ALIVE!
Sorry. I mean, that I confirm, that it works on Windows + Anaconda + Python 3.6.1.

@scottdraves
Copy link
Contributor Author

great thx for the report

@scottdraves scottdraves assigned EfimovVladimir and unassigned gnestor and rbidas Aug 23, 2017
@scottdraves
Copy link
Contributor Author

see conda-forge/staged-recipes#3599
we have a new way of building for windows but something is still wrong.

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

No branches or pull requests

6 participants