-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
IJulia Installation Fails on Windows because ipykernel is not Installed #739
Comments
IJulia is not the source of the problem here — the initial error is the
In Julia, try using Conda
Conda.runconda(`update -y conda`)
Conda.runconda(`update -y ipykernel`)
Conda.runconda(`update -y --all`) Does that fix the problem? Another issue where a similar error is reported is where the problem was "out of date ActiveState 2.7 install" and the solution was to remove |
Sorry I accidentally deleted my previous comment -_-.
That is not where my Python executable is at. How can I tell conda to use something else? |
Running the series of conda commands in Julia gives:
Manually feeding the right path gives:
EDIT: adding PYTHONPATH myself made the manual way to work. I'm surprised for all the missing environment variables. But I still need conda to work with Julia. |
Are there other environment variables that conda looks at? I can manually add them. |
I have the same problem in Windows 7 and Julia 0.7/1.0. |
What did you need the "right path" for? The error indicates that You could explicitly try to add it again with It could be the conda/conda#7351 problem, where it is some old installation that is messing things up? |
|
The trick only worked for my desktop though, which is running the up-to-date version of Windows 10 Education. My laptop is running Windows 10 Pro 1803. |
@Kilo19, your suggestion to use Furthermore, your original error output included Can you clarify what changed? |
One of my students indicated that a workaround was to force Conda to install Python 2, as apparently only the Python 3 version of ipywidgets is causing the problem on Windows. To do this, you can do: using Conda # you may need to "add Conda" at the pkg prompt first
rm(Conda.ROOTENV, recursive=true) # remove your existing Conda installation
ENV["CONDA_JL_VERSION"]="2"
Pkg.build("IJulia") # re-install jupyter In the long run, however, it would be good to figure out what is going on and file a proper bug report to the anaconda folks. It would be very helpful if an experienced developer with Windows could reproduce this problem and give a more detailed analysis. @tkelman or @ChrisRackauckas? |
|
Thanks @tkelman, this is happening in clean from-scratch installs as of this week. It would be great if you can help file a conda issue. |
@tkelman I'm running Sandisk CloudSpeed Ultra Gen II on my laptop. My desktop uses Toshiba XG3. If my FS is slow enough to cause the issue then think about all the poor guys still running spinning rust as their boot drives. Regarding py2 and py3, my desktop has 2.7, 3.6.5 32-bit, and 3.6.5 64-bit before and after installing Julia-related things (all directly from python.org, no bundled distributions like Anaconda), and IJulia installed the newest Miniconda 3 64-bit. My place has some slow connection right now. I'll try the suggestion from @stevengj later. I might also fire up a bunch of VMs to experiment. Worst comes to worst I'll run a Linux VM on my laptop as a temporary workaround. |
If someone can reproducibly go from a clean fresh miniconda to a conda call that triggers the error, that's enough for a conda bug report or adding to the existing one. Modifying the post-link script so it stops redirecting output can be useful to see exactly where the error is happening. I also think I have a pull request open on conda-forge's ipykernel that drops the post-link script since I think it's not necessary any more, which would eventually make it into the anacondarecipes default channel if it were merged. |
try: |
I got around the issue by installing jupyter on vanilla python with pip and point ENV["JUPYTER"] to it. I tried installing Anaconda myself as well but the newest version of Anaconda would not work because the relative location between jupyter.exe and python.exe for Anaconda is different from installing jupyter on vanilla python.
That is not true for Anaconda3-5.2.0-Windows-x86_64:
|
@Kilo19, why does the relative location of jupyter.exe and python.exe matter? I thought in Anaconda you don't normally run things directly out of the |
@stevengj That's what I thought. But apparently when IJulia tries to detect presence of jupyter it wants to use python.exe one level above ENV["JUPYTER"] to execute jupyter-script.py that's in the same folder as ENV["JUPYTER"]. That's the first thing it failed in my log. After that it tries to install its miniconda and I got the same error. |
Julia just runs And, as I said, it looks wrong to me that you are supplying the (Note that all of this has nothing to do with the original issue.) |
@stevengj Just found that I had to use the one under |
I have had the same problem (Windows 10, Julia 0.7). I played around with different Anaconda settings without success). It seems like IJulia is just not working with Julia 0.7 and 1.0 at the moment (#693). I now installed 0.6.4 and IJulia is working smoothly, so far. |
No, #693 is fixed. Did you try my suggestion (#739 (comment)) of telling Conda.jl to use Python 2? |
Dear stevengj, #739 worked for me. I was having the same error message as Kilo19 in his first post. I'm using Windows 7 and Julia 1.0. Not really sure yet what will I be missing by using Py2 instead of Py3 but Thank You very much for the tip. |
Just a report: the suggestion #739 (comment) perfectly works to me for Julia 0.7/1.0 on Windows 7/10. Thank you for the solution. |
Windows 10 with Julia 1.0 here. #739 (comment) works for me too. Thanks! |
Could one of the Windows users please do a minimal test to reproduce without involving Julia, and then file a bug report with Anaconda? Steps should be something like:
Assuming this (or something similar) reproduces the error, file a bug report at https://github.com/ContinuumIO/anaconda-issues |
I reproduced this issue on Windows 7 as you suggested in #739 (comment). I will file a bug report. |
|
EDIT: I updated the report. I think the issue is not solved yet. A fresh installation of Jupyter in the latest Miniconda3 (#739 (comment)) still fails with a different error. Precisely, the installation ends with the following message.
And when I type
I also tried
In the upstream, the discussion continues. Unfortunately, I am not really sure what is actually discussed there. |
|
@tkelman Probably we are chatting. But I got an error; please see my comment above that I just edited. |
Gotcha, the errors look like they have the same root cause. Basically conda's been patching their python to do some ugly things to PATH all this time, and they finally got rid of that patch for 3.7. So for external programs to call into conda's python now in a way that needs to load any conda-sourced libraries, they'll need to activate the conda environment first. |
@tkelman Thank you for your comment! Probably I have to wait for the next release. I am happy to test the new one. |
Just a report. This issue is fixed with the latest EDIT: For now, there are two solutions to this issue: 1) to use Python 2 as in #739 (comment), or 2) to install the latest |
I also mentioned in https://discourse.julialang.org/t/trouble-installing-ijulia-in-fresh-julia-1-0/15244/6?u=tkf but just running |
I'm running Windows 10 1803. I tried to install IJulia with Julia 0.7.0 as well as 1.0.0 and both failed. Julia tries to intsall miniconda and tries to invoke the bundled Jupyter but could not find the Python executable. C:%homepath%.julia\packages\IJulia\k5o7j\deps\build.log says:
And then an ugly mess of exceptions:
I looked at the script that failed:
However,
%PREFIX%
is not defined on my system. I manually added PREFIX as a system enviornment variable that points to the folder of the Python executable from miniconda (in my caseC:\Users\K19\.julia\packages\Conda\m7vem\deps\usr\pkgs\python-3.7.0-hea74fb7_0
)and ran refreshenv.
I compiled IJulia again using
Pkg.build("IJulia")
and it failed again. I ran the aforementioned script again, and it tells me that "No module named ipykernel".I don't know if IJulia is at fault but since I encountered this problem while installing IJulia I'll submit my issue here. Feel free to point me to other places.
The text was updated successfully, but these errors were encountered: