Why is notebook() not working for IJulia? - jupyter-notebook
I am receiving this issue while trying to use notebook() in Julia (Command Line Interface REPL)
julia> using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
julia> notebook()
[ Info: running setenv(`/root/miniconda3/bin/jupyter notebook`,["_CE_M=", "LSCOLORS=Gxfxcxdxbxegedabagacad", "PATH=/root/miniconda3/bin:/root/miniconda3/bin:/root/miniconda3/condabin:/bin:/usr/bin:/sbin:/usr/sbin:/root/julia-1.3.1/bin", "QT_ACCESSIBILITY=1", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus", "XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0", "XDG_SESSION_DESKTOP=GNOME", "SSH_AGENT_PID=2661", "XDG_SESSION_TYPE=x11", "QT_IM_MODULE=ibus", "USER=root", "PAM_KWALLET5_LOGIN=/run/user/0/kwallet5.socket", "LESS=-R", "CONDA_PROMPT_MODIFIER=(base) ", "XDG_DATA_DIRS=/usr/share/gnome:/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share", "CLUTTER_IM_MODULE=ibus", "SHELL=/usr/bin/zsh", "GJS_DEBUG_OUTPUT=stderr", "XAUTHORITY=/root/.Xauthority", "XDG_MENU_PREFIX=gnome-", "GTK_MODULES=gail:atk-bridge", "GTK_IM_MODULE=ibus", "MANAGERPID=2575", "SESSION_MANAGER=local/kali:#/tmp/.ICE-unix/2753,unix/kali:/tmp/.ICE-unix/2753", "XMODIFIERS=#im=ibus", "_CE_CONDA=", "CONDA_SHLVL=1", "CONDA_EXE=/root/miniconda3/bin/conda", "HOME=/root", "TERM=xterm-256color", "COLORTERM=truecolor", "VTE_VERSION=5802", "CONDA_PYTHON_EXE=/root/miniconda3/bin/python", "INVOCATION_ID=a29cdf2f60b140acb65b8e9d69af5b77", "IM_CONFIG_PHASE=1", "XDG_CURRENT_DESKTOP=GNOME", "LANG=C.UTF-8", "LOGNAME=root", "GNOME_DESKTOP_SESSION_ID=this-is-deprecated", "XDG_RUNTIME_DIR=/run/user/0", "SHLVL=1", "SSH_AUTH_SOCK=/run/user/0/keyring/ssh", "DESKTOP_SESSION=/usr/share/xsessions/gnome-xorg", "OLDPWD=/root", "_=/root/julia-1.3.1/bin/julia", "PAGER=less", "CONDA_DEFAULT_ENV=base", "GPG_AGENT_INFO=/run/user/0/gnupg/S.gpg-agent:0:1", "GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/73a7f463_14d7_4c04_adfb_a849e0d337b9", "ZSH=/root/.oh-my-zsh", "GNOME_TERMINAL_SERVICE=:1.261", "PWD=/root/JuliaPro-1.2.0-2", "XDG_SESSION_CLASS=user", "DISPLAY=:0", "GJS_DEBUG_TOPICS=JS ERROR;JS LOG", "XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1", "CONDA_PREFIX=/root/miniconda3", "JOURNAL_STREAM=9:29944", "QT4_IM_MODULE=ibus", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:", "OPENBLAS_MAIN_FREE=1"])
Process(setenv(`/root/miniconda3/bin/jupyter notebook`,["_CE_M=", "LSCOLORS=Gxfxcxdxbxegedabagacad", "PATH=/root/miniconda3/bin:/root/miniconda3/bin:/root/miniconda3/condabin:/bin:/usr/bin:/sbin:/usr/sbin:/root/julia-1.3.1/bin", "QT_ACCESSIBILITY=1", "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus", "XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0", "XDG_SESSION_DESKTOP=GNOME", "SSH_AGENT_PID=2661", "XDG_SESSION_TYPE=x11", "QT_IM_MODULE=ibus" … "PWD=/root/JuliaPro-1.2.0-2", "XDG_SESSION_CLASS=user", "DISPLAY=:0", "GJS_DEBUG_TOPICS=JS ERROR;JS LOG", "XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1", "CONDA_PREFIX=/root/miniconda3", "JOURNAL_STREAM=9:29944", "QT4_IM_MODULE=ibus", "LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:", "OPENBLAS_MAIN_FREE=1"]; dir="/root"), ProcessExited(1))
This is very confusing and likely a beginner issue.
As suggested by #SalchiPapa , here is my versioninfo:
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i3-6006U CPU # 2.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Also, the jupyter notebook starts up the localhost for me but kernel keeps having errors for julia-1.3.1 . This doesn't work for me as it shows this error : ERROR: LoadError: Blosc not installed properly, run Pkg.build("ZMQ"), restart Julia and try again and this one at the same time : ERROR: LoadError: Failed to precompile ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] to /root/.julia/compiled/v1.3/ZMQ/CaaO6_riTu7.ji.
Manually tried to Pkg.add and Pkg.build each of ZMQ, Blosc and CMake but to no success.
Finally found a solution. Much thanks to #SalchiPapa who took his time out to personally videocall me and solve the issue. Solution right now is to not run IJulia from root
What worked for me :
$su user-not-root
$julia
using IJulia;notebook(detached=true)
This should show ProcessRunning at the end.
run(path/to/jupyter notebook list) with pair of backticks inside run().
This gave me the url and token appended to it . That worked out well.
I suggest that the community help solve this issue.
I have linked this answer to a Github issue here
Related
Unrecognized runtime "julia"; defaulting to "python3"
I am trying to run the Julia template in Google Colab, but the first code block throws the following warning: Unrecognized runtime "julia"; defaulting to "python3" Google search didn't help. Any ideas?
Ignore the popup Unrecognized runtime "julia"; defaulting to "python3". When you start, it opens a connection to a machine. julia is not installed on the machine. The first cell starts with '%%shell' to tell jupyter to feed the rest of the cell to the command 'shell'. The rest of the first cell are a series of shell commands that install julia. This script that installs julia can take a while. When I just tried it, it ran for over 4 minutes. It has several "Installing ..." progress messages, but 3:30 of the wait was after it said "Installing Julia package Plots...". Eventually the output (white area below the gray cell that starts with '%%shell') should say something like the text that was there before it started: Installing Julia 1.7.1 on the current Colab Runtime... 2022-05-12 01:19:55 URL:https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.1-linux-x86_64.tar.gz [123374573/123374573] -> "/tmp/julia.tar.gz" [1] Installing Julia package IJulia... Installing Julia package BenchmarkTools... Installing Julia package Plots... (long delay here) Installing IJulia kernel... [ Info: Installing julia kernelspec in /root/.local/share/jupyter/kernels/julia-1.7 Successfully installed julia version 1.7.1! Please reload this page (press Ctrl+R, ⌘+R, or the F5 key) then jump to the 'Checking the Installation' section. If you've waited much longer than 5 minutes and it hasn't completed, maybe try disconnecting (menu "Runtime" > "Disconnect and delete runtime"), refresh, and start the first cell again.
Ran into the same issue. Found this on Julia's discourse forum (https://discourse.julialang.org/t/how-to-run-julia-in-google-colab/43169)
How to fix modprobe error from MPSS 4.4.1
Reaching out to the wider group as I am totally stumped trying to install Intel MPSS 4.x for my Xeon Phi 7220P. I followed the precise steps in this link: Intel MPSS Linux User Guide Rev 4.4.1, and did it 3 times to make sure I wasn't missing any steps or making mistakes, but keep getting the following error readout: modprobe: WARNING: Module mic_x200_dma not found. modprobe: WARNING: Module scif_bus not found. modprobe: WARNING: Module vop_bus not found. modprobe: WARNING: Module cosm_bus not found. modprobe: WARNING: Module scif not found. modprobe: WARNING: Module vop not found. modprobe: WARNING: Module mic_cosm not found. modprobe: WARNING: Module mic_x200 not found. As a result of this, I cant do the basic MPSS commands such as micctrl -s etc nor use the Xeon Phi whatsoever. I am running Centos 7 (862 kernel), and know its not listed in the Intel pdf, but did not think this should be causing an issue as it seems that the above kernel modules are simply not being installed seemingly from Intel MPSS - but not sure if this diagnosis is correct. Would appreciate your help - many thanks in advance!
It is complaining about that because at one point your kernel got updated from 3.10.0-514.el7 to a later version, (it happens automatically when you do a yum update, annoying I know) Check your kernel version by running uname -r When you installed/compiled all the modules they were placed into /lib/modules/3.10.0-514.el7.x86_64 which is where the source code you have exported to. You have 2 options: Recompile the source code to work for your current kernel version (which is a pain and has it's own problems) Revert your host kernel back to 3.10.0-514.el7 via grub config (example here) and everything will work nicely I too struggled with this very much in the beginning and I had to read pretty much every line of source code and spend countless hours debugging until I found out. At this point there is nothing I do not know about the Xeon Phi x100/x200. The documentation is not bad, but it didn't cover this bare essential, which is frustrating.
failed to precompile Gurobi (on Windows, using Julia)?
I am trying to run a Julia program using Gurobi solver on Windows. I have already set up my GUROBI_HOME in windows as C:\gurobi701\win64. Here is the error message in Atom: error msg I have done the following in Julia interactive shell: Pkg.add("Gurobi") also Pkg.update() Also, I checked whether or not my gurobi license file is not properly set up by running their example: > gurobi_cl C:\gurobi701\win64\examples\data\coins.lp The output seems fine: output for gurobi command line What is the possible error here? Thanks a lot for help!!!
Julia : JLD package doesn't work when running Julia development version
The current version of Julia is 0.4.6. I, however, am running the development version 0.5. Suddenly JLD doesn't work. It's installed and updated. Yesterday I compiled code using JLD but this morning it doesn't work. julia> using JLD INFO: Precompiling module JLD... WARNING: Method definition convert(Type{#T<:AbstractString}, AbstractArray{#S<:Union{Char, Int32, UInt32}, 1}) in module Base at unicode/utf32.jl:131 overwritten in module LegacyStrings at /root/.julia/v0.5/LegacyStrings/src/utf32.jl:133. WARNING: Method definition isvalid(Array{Char, 1}) in module Base at unicode/utf32.jl:177 overwritten in module LegacyStrings at /root/.julia/v0.5/LegacyStrings/src/utf32.jl:179. WARNING: New definition string(Union{Char, LegacyStrings.UTF8String, LegacyStrings.ASCIIString}...) at /root/.julia/v0.5/LegacyStrings/src/utf8.jl:161 is ambiguous with: string(Union{Char, UTF8String, ASCIIString}...) at unicode/utf8.jl:166. To fix, define string(Char...) before the new definition. WARNING: both LegacyStrings and Base export "UTF16String"; uses of it in module JLD must be qualified ERROR: LoadError: LoadError: UndefVarError: UTF16String not defined in include(::ASCIIString) at ./boot.jl:234 in include_from_node1(::ASCIIString) at ./loading.jl:417 in include(::ASCIIString) at ./boot.jl:234 in include_from_node1(::ASCIIString) at ./loading.jl:417 [inlined code] from ./boot.jl:237 in anonymous at ./<no file>:4294967295 in eval(::Module, ::Any) at ./boot.jl:237 [inlined code] from ./sysimg.jl:11 in process_options(::Base.JLOptions) at ./client.jl:239 in _start() at ./client.jl:318 while loading /root/.julia/v0.5/JLD/src/jld_types.jl, in expression starting on line 11 while loading /root/.julia/v0.5/JLD/src/JLD.jl, in expression starting on line 130 ERROR: Failed to precompile JLD to /root/.julia/lib/v0.5/JLD.ji in error(::ASCIIString) at ./error.jl:21 in compilecache(::ASCIIString) at ./loading.jl:496 in compilecache(::Symbol) at ./loading.jl:485 in require(::Symbol) at ./loading.jl:355 in eval(::Module, ::Any) at ./boot.jl:237
When using the development version of Julia, you need to use the development versions of the packages (which works for packages where the developer keeps master up-to-date but hasn't tagged yet). If you run Pkg.checkout("JLD") to checkout master, JLD should work (works on my machine. Note you may need to Pkg.update() before checking out, and you may need to quit Julia and re-open it to recompile the new version). But as a word of caution, don't use the development versions of Julia as a way to test things out. Remember, the language is still in alpha and there is no guarantee that the package ecosystem or Julia itself will work with the daily master. The dailies are good for working on the language and preparing packages for the next version (and being ballsy I guess).
Well, you're using Julia 0.5 which is still in development. If you switch to 0.4.6 then it should be fine. I'm using that and JLD works fine for me. You could also trying running Pkg.update() closing Julia, then reopening, to see if that helps.
R EnvironmentError: Could not find Ghostscript on path. RWebLogo
I ran into an odd issue that I cannot fix in any way and I was hoping someone here may have a better understanding of whats wrong; I am unable to use RWebLogo package - even run the simplest examples due to the same missing Ghostscript error. e.g. running: library(RWebLogo) aln <- c('CCAACCCAA', 'CCAACCCTA', 'AAAGCCTGA', 'TGAACCGGA') weblogo(seqs=aln, file.out='mylogo.pdf') Throws this error: Traceback (most recent call last): File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo", line 71, in <module> weblogolib._cli.main() File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/_cli.py", line 82, in main formatter(data, format, opts.fout) File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 757, in pdf_formatter gs = GhostscriptAPI() File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 196, in __init__ raise EnvironmentError("Could not find Ghostscript on path." EnvironmentError: Could not find Ghostscript on path. There should be either a gs executable or a gswin32c.exe on your system's path I have installed ghostscript ver 9.15 with configure/make/install in the terminal and then added the PATH to bash profile and executed it. When I run gs in the terminal it works, confirming it is set to the system path, yet the same error still occurs. Even after rebooting. I tried adding the gs to the environment in R directly: Sys.setenv(R_GSCMD = "/Applications/ghostscript-9.15/bin/gs") which also hasn't helped... Gives exactly the same error. When I search the R environment it shows that gs is there. Important version information: MAC: OS Yosemite 10.10.1; R version 3.1.1 (2014-07-10); Platform: x86_64-apple-darwin10.8.0 (64-bit); RWebLogo_1.0.3 Do you know of any issue that may have cause this problem? I'm new to programming, so I am worried I may be missing something basic. I would be grateful for any advice. Thank you!
I have gotten in touch with Omar, the author of RWebLogo, and he has been really helpful in pinpointing my problems and resolving the issue. First, he advised to run the RWebLogo on a test sequence on the terminal: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo -f test_seqs.txt -o ~/Desktop/out.pdf -F pdf Change the base directory (everything before extdata/weblogo …) of the script above to be whatever the command below gives you in R: system.file(package = 'RWebLogo') I ran it and got a new error: the lack of numpy. I actually had the numpy installed but without full user privileges. After reinstalling numpy, the RWebLogo was successfully running from the terminal. Still, the RStudio was throwing a GhostScript error. Omar suggested that there is a problem with an older version of RStudio running on Yosemite (I currently have 10.10.1), and sent me a link to an updated RStudio version where the problem was fixed. http://www.r-bloggers.com/r-and-rstudio-incompatibility-with-yosemite-mac-os-x-10-10/ I got the updated RStudio and everything works great there right now. Hope this helps someone with a similar issue!