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

Endless miniconda install loop #79

Open
pemryan opened this issue Jul 10, 2017 · 11 comments
Open

Endless miniconda install loop #79

pemryan opened this issue Jul 10, 2017 · 11 comments

Comments

@pemryan
Copy link

pemryan commented Jul 10, 2017

move from here: JuliaPy/PyCall.jl#379

seems something wired happens in C:\JuliaPro-0.5.2.2\pkgs-0.5.2.2\v0.5\Conda\src\conda.jl, around line 186:

if is_windows()
if VERSION >= v"0.5.0-dev+8873" # Julia PR #13780
run(Cmd($installer /S /AddToPath=0 /RegisterPython=0 /D=$PREFIX, windows_verbatim=true))
else
# Workaround a bug in command-line argument parsing, see
# Luthaf/Conda.jl#17
if match(r" {2,}", "") != nothing
error("The installer will fail when the path="$PREFIX" contains two consecutive spaces")
end
run($installer /S /AddToPath=0 /RegisterPython=0 $(split("/D=$PREFIX")))
end
end

I checked the install.exe downloaded, it can be installed manually.
C:\JuliaPro-0.5.2.2\pkgs-0.5.2.2\v0.5\Conda\deps\usr>installer.exe /AddToPath=0 /RegisterPython=0 /D="C:\JuliaPro-0.5.2.2\pkgs-0.5.2.2\v0.5\Conda\deps\usr".

Then re-run Pkg.build("PyCall"), the miniconda download-install loop can be bypassed.

@davidzentlermunro
Copy link

I'm also having this issue. First when I try using PyPlot I get the error: No working GUI backend found for matplotlib. I then try standard solution for this - ENV["PYTHON"]=""; Pkg.build("PyCall"). However, this starts an endless chain of julia downloading and installing miniconda:

INFO: Downloading miniconda installer ... INFO: Installing miniconda ... INFO: Downloading miniconda installer ... INFO: Installing miniconda ... INFO: Downloading miniconda installer ... INFO: Installing miniconda ... INFO: Downloading miniconda installer ... INFO: Installing miniconda ...

I am using julia 0.5.0 via Juno for JuliaPro0.50.5

@mbeltagy
Copy link

This problem is still outstanding. I saw this on friend's computer running Windows 10. We downloaded Julia 0.62 and proceeded to install IJulia when we came across this problem. It is blocker for a novice and we are thinking now that the only alternative in to install on the Linux subsystem of windows.

@stevengj
Copy link
Member

Presumably it is some network or firewall problem with your machine?

The simplest alternative would be to download Matplotlib yourself, e.g. by installing Anaconda Python manually.

@ayan1991
Copy link

so,who knows how to solve such problem?

@stevengj
Copy link
Member

stevengj commented Jun 13, 2018

Any updates here? It seems like a problem in the Miniconda installer script for Windows, not something we can fix ourselves? May be due to deficiencies of Base.download, see JuliaLang/julia#27043

@epogrebnyak
Copy link

It is still a problem on Windows 10:

INFO: Building Conda
INFO: Building PyCall
Info: Using the Python distribution in the Conda package by default.
To use a different Python version, set ENV["PYTHON"]="pythoncommand" and re-run Pkg.build("PyCall").
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...
Info: Downloading miniconda installer ...
Info: Installing miniconda ...

@pedrolazera
Copy link

I think I found a way to solve the issue. The workaround is use a pre-existing Conda installation, to prevent the Conda Julia module to try to install a new Conda ("Installing miniconda..."). I'm using Windows 10.

In the end, you have to make sure that, in Julia, after you load the Conda.jl module ("using Conda"), the command isfile(Conda.conda) returns true

1. Install conda or miniconda on your computer. Here are the official docs: https://docs.conda.io/projects/conda/en/latest/user-guide/install/

2. Open the Anaconda Prompt and create a new environment with the following command:

conda create --name conda_jl python conda

The "conda" at the end will make sure the Conda.exe file exists in this new environment.

3. In Julia, run the following commands:

julia> ENV["CONDA_JL_HOME"] = "/path/to/miniconda/envs/conda_jl"

pkg> build Conda

Another way is to add to your startup.jl file the following command:

ENV["CONDA_JL_HOME"] = "/path/to/miniconda/envs/conda_jl"
  • obs: to view a list of all your existing conda environments, on a Anaconda Prompt type conda env list

4. Close and open Julia. Check if the following commands work:

using Conda
Conda.add("numpy")

Done.

@stevengj
Copy link
Member

I just installed on Windows 10 with no problem, so it would be nice to know what is causing the failure on some machines.

@AJV009
Copy link

AJV009 commented Mar 29, 2020

I STILL have problem! Anybody please help me out!

@AJV009
Copy link

AJV009 commented Mar 29, 2020

I think I found a way to solve the issue. The workaround is use a pre-existing Conda installation, to prevent the Conda Julia module to try to install a new Conda ("Installing miniconda..."). I'm using Windows 10.

In the end, you have to make sure that, in Julia, after you load the Conda.jl module ("using Conda"), the command isfile(Conda.conda) returns true

1. Install conda or miniconda on your computer. Here are the official docs: https://docs.conda.io/projects/conda/en/latest/user-guide/install/

2. Open the Anaconda Prompt and create a new environment with the following command:

conda create --name conda_jl python conda

The "conda" at the end will make sure the Conda.exe file exists in this new environment.

3. In Julia, run the following commands:

julia> ENV["CONDA_JL_HOME"] = "/path/to/miniconda/envs/conda_jl"

pkg> build Conda

Another way is to add to your startup.jl file the following command:

ENV["CONDA_JL_HOME"] = "/path/to/miniconda/envs/conda_jl"
* obs: to view a list of all your existing conda environments, on a Anaconda Prompt type `conda env list`

4. Close and open Julia. Check if the following commands work:

using Conda
Conda.add("numpy")

Done.

I tried but I still get false from isfile(Conda.conda)

@AJV009
Copy link

AJV009 commented Mar 29, 2020

Just ran the same commands this time with admin rights! And it worked

julia> run(`conda create -n conda_jl python conda`)
julia> ENV["CONDA_JL_HOME"] = "\\path\\to\\miniconda\\envs\\conda_jl"  # change this to your path
pkg> build Conda

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

No branches or pull requests

8 participants