Installing Julia - gher-uliege/Documentation GitHub Wiki
- If you have a problem installing Julia, consult the page https://julialang.org/downloads/platform/ (note that on Windows, I do not recommend modifying the PATH environment variable)
- The package manager can take some time, be patient. Only interrupt the package manager if you see no new screen output after say 30 minutes.
- The package manager keeps a list of available software. If the list is incomplete or corrupted, then delete the folder
/home/<username>/.julia
orc:\Users\<username>\.julia
(where<username>
is your username) (see https://discourse.julialang.org/t/registry-toml-missing/24152)- For Macs, view hidden files with Command+Shift+Dot in Finder (https://setapp.com/how-to/show-hidden-files-on-mac).
- Open the "File Explorer", go to "This PC" and navigate to
c:\Users\username\
- On Windows the antivirus software can significantly slow down or interfere with the installation (of julia or its packages). It might be necessary to disable it temporarily.
- If you have a previous anaconda installation, make sure that its installation directory is not in your
PATH
environment variable.
If you have a special characters in your user name (like an umlaut, an accent or a space) the installation which defaults to
directory C:\Users\<username>\.julia\Conda\3
will fail on Windows.
This is a known issue. The work-around is to install Miniconda to a user-writable directory outside of the home directory. The following has been tested on Windows 10, version 19041.630.
If you have a unsuccessful installation of Conda.jl
and/or related packages like IJulia
or PyPlot
, it might be necessary to remove these packages first.
Before installing Conda.jl
, choose a directory without space and without special characters and set the environment variable CONDA_JL_HOME
as follows inside a julia session:
ENV["CONDA_JL_HOME"] = "C:\\Conda-julia\\3"
mkpath(ENV["CONDA_JL_HOME"])
# Install Conda.jl
using Pkg
Pkg.add("Conda")
using Conda
# this should be your choosen Conda home directory
@show Conda.ROOTENV
If you use IJulia, you can likewise check the path of the jupyter
command:
using IJulia
# this should start with your choosen Conda home directory
@show IJulia.JUPYTER
You can also run jupyter-notebook
independently from julia from the Windows Command Prompt:
cd C:\Conda-julia\3\condabin
conda activate
..\Scripts\jupyter-notebook.exe
On Windows, if the notebook interface does not appear in a web browser, look for a dialog asking you which browser to use (with the question "How do you want to open this file?" It is preferable to choose Firefox, Google Chrome or Chromium rather than Internet Explorer/Edge).
In some cases however, the browser might still not open when using the julia notebook()
command.
This issue has been seen on Windows 10 with Jupyter 1.0.0 and notebook 6.2.0 installed from miniconda.
The issue has been solved following these instructions. Open the Windows Command Prompt and run the following commands:
cd C:\CONDA-JULIA\3\condabin
conda activate
jupyter notebook --generate-config
Edit the file c:\Users\<username>\.jupyter\jupyter_notebook_config.py
and set c.NotebookApp.use_redirect_file = False
.
If you need to report an issue, please include the following information:
- Operating system and its version (e.g. Windows 10, Ubuntu 20.04)
- Copy and paste the error message text (avoid screenshots if you can; this makes searching the error message much simpler)
- Steps done so far that led to the error
- Do you have Anaconda installed? If yes, is Anaconda activated by default?
- The content of the environment variable
PATH
- for windows see https://www.computerhope.com/issues/ch000549.htm
- for Linux or Mac: open a terminal and type
echo $PATH
- Only for problems with
IJulia
:- search for the file
jupyter-notebook
on your computer and provide the full paths found (there can be several) - In a Julia session, paste the following commands and provide the output that you are getting.
- search for the file
ENV["IJULIA_DEBUG"]=true
using Pkg
Pkg.build("IJulia",verbose=true)
using IJulia
IJulia.notebook()
Providing the information for all these points helps a lot to help a user.
Enable powershell scripting using in a PowerShell terminal:
Set-ExecutionPolicy RemoteSigned