JuliaPy / Conda.jl

Conda managing Julia binary dependencies
Other
172 stars 57 forks source link

Friendly error message for users with special characters in user names on Windows #200

Closed Alexander-Barth closed 1 year ago

Alexander-Barth commented 3 years ago

This PR closes #199

Alexander-Barth commented 3 years ago

OK, I placed the error message now in _install_conda. I chose an error (instead of a warning) because the current miniconda installer failed in all cases that I am aware of. But I did not try miniforge or any non-default locale settings/file systems. I have no strong opinion about this.

Alexander-Barth commented 3 years ago

Thank you very much for your feed-back. I just updated the PR. With the revised PR, the error message now reads:

ERROR: Conda.jl cannot be installed to its default location C:\Users\Clément\.julia\conda\3
as Miniconda does not support the installation to a directory with a space or a
non-ASCII character on Windows. The work-around is to install Miniconda to a
user-writable directory by setting the CONDA_JL_HOME environment variable. For
example on Windows:

ENV["CONDA_JL_HOME"] = raw"C:\Conda-Julia\3"
using Pkg
Pkg.build("Conda")

The Julia session need to be restarted. More information is available at
https://github.com/JuliaPy/Conda.jl.
Alexander-Barth commented 3 years ago

I am wondering if this PR can be merged now. Should I rebase it?

mkitti commented 1 year ago

Hmm, if you rebase I will merge.

Alexander-Barth commented 1 year ago

I just rebased the PR. I now see this failure on windows:

[ Info: Running `conda create -q -y -p 'C:\Users\runneradmin\.julia\conda\3\x86_64\envs\test_conda_jl'` in root environment
...
 File "C:\Users\runneradmin\.julia\conda\3\x86_64\lib\site-packages\urllib3\_request_methods.py", line 10, in <module>
    from .response import BaseHTTPResponse
  File "C:\Users\runneradmin\.julia\conda\3\x86_64\lib\site-packages\urllib3\response.py", line 282, in <module>
    class BaseHTTPResponse(io.IOBase):
  File "C:\Users\runneradmin\.julia\conda\3\x86_64\lib\site-packages\urllib3\response.py", line 292, in BaseHTTPResponse
    DECODER_ERROR_CLASSES += (brotli.error,)
AttributeError: module 'brotli' has no attribute 'error'

This seems to be a known conda issue: https://github.com/conda/conda/issues/9903

mkitti commented 1 year ago

I encountered the same issue earlier.