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

Mamba fails to resolve hostname #17

Closed
jameshgrn opened this issue Apr 17, 2022 · 12 comments
Closed

Mamba fails to resolve hostname #17

jameshgrn opened this issue Apr 17, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@jameshgrn
Copy link

Environment Information

  • geospatial version: current
  • Python version: 3.9
  • Operating System: OSX Monterey 12.3.1

Description

Hey Qiusheng,

followed the install instructions with conda + mamba but get 'could not resolve hostname' for every package

What I Did

followed the instructions for a clean 3.9 install

mamba install -c conda-forge geospatial

here is the stack trace for one package as an example (this pattern repeats for all packages, not just voila)

voila [> ] (00m:05s) Couldn't resolve host name

this is followed by a conda report, I'll dump it here:

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/conda/exceptions.py", line 1082, in __call__
        return func(*args, **kwargs)
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/mamba/mamba.py", line 882, in exception_converter
        raise e
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/mamba/mamba.py", line 876, in exception_converter
        exit_code = _wrapped_main(*args, **kwargs)
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/mamba/mamba.py", line 835, in _wrapped_main
        result = do_call(args, p)
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/mamba/mamba.py", line 716, in do_call
        exit_code = install(args, parser, "install")
      File "/Users/jakegearon/opt/anaconda3/lib/python3.8/site-packages/mamba/mamba.py", line 572, in install
        downloaded = transaction.prompt(
    RuntimeError: Download error (6) Couldn't resolve host name [https://conda.anaconda.org/conda-forge/noarch/aenum-3.1.11-pyhd8ed1ab_0.tar.bz2]

`$ /Users/jakegearon/opt/anaconda3/bin/mamba install -c conda-forge geospatial`

  environment variables:
                 CIO_TEST=<not set>
        CONDA_DEFAULT_ENV=geo
                CONDA_EXE=/Users/jakegearon/opt/anaconda3/bin/conda
             CONDA_PREFIX=/Users/jakegearon/opt/anaconda3/envs/geo
           CONDA_PREFIX_1=/opt/miniconda3
           CONDA_PREFIX_2=/Users/jakegearon/opt/anaconda3
           CONDA_PREFIX_3=/Users/jakegearon/opt/anaconda3/envs/IS2SE
    CONDA_PROMPT_MODIFIER=(geo)
         CONDA_PYTHON_EXE=/Users/jakegearon/opt/anaconda3/bin/python
               CONDA_ROOT=/Users/jakegearon/opt/anaconda3
              CONDA_SHLVL=4
           CURL_CA_BUNDLE=<not set>
     JAVA_LD_LIBRARY_PATH=:-
                     PATH=/Library/Frameworks/GDAL.framework/Programs:/usr/local/opt/node@10/bin
                          :/Users/jakegearon/opt/anaconda3/envs/geo/bin:/opt/miniconda3/condabin
                          :/Users/jakegearon/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/us
                          r/sbin:/sbin:/opt/X11/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : geo
    active env location : /Users/jakegearon/opt/anaconda3/envs/geo
            shell level : 4
       user config file : /Users/jakegearon/.condarc
 populated config files : /Users/jakegearon/.condarc
          conda version : 4.12.0
    conda-build version : 3.21.4
         python version : 3.8.13.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/jakegearon/opt/anaconda3  (writable)
      conda av data dir : /Users/jakegearon/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/jakegearon/opt/anaconda3/pkgs
                          /Users/jakegearon/.conda/pkgs
       envs directories : /Users/jakegearon/opt/anaconda3/envs
                          /Users/jakegearon/.conda/envs
               platform : osx-64
             user-agent : conda/4.12.0 requests/2.27.1 CPython/3.8.13 Darwin/21.4.0 OSX/10.16
                UID:GID : 501:20
             netrc file : /Users/jakegearon/.netrc
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

I've checked that mamba and conda both work for individual packages (I use mamba normally). I think the conda installation of geospatial works, but I haven't been able to wait out the solver yet to confirm.

Tried multiple new envs and even restarting my computer and no dice. any advice?

Cheers,

Jake

@jameshgrn jameshgrn added the bug Something isn't working label Apr 17, 2022
@datarocks
Copy link

I also am running into this issue, also on Monterey.

@giswqs
Copy link
Member

giswqs commented Apr 18, 2022

Thank you for reporting. I just tested it on my Linux machine. Everything works fine. I wondered if this is a general conda/mamba issue on Mac or is it caused by the geospatial package? Do you encounter the same issue when installing other packages? for example, xarray?

mamba install -c conda-forge xarray

@giswqs
Copy link
Member

giswqs commented Apr 18, 2022

I just tested it on a Mac Mini with macOS Monterey and did not encounter any errors. Could it be an network issue during your installation?

image
image

@jameshgrn
Copy link
Author

@giswqs @datarocks Q, to see if it's a network error I'll try it on campus today on the ethernet. If not, I'll do some more digging and report back.

@jameshgrn
Copy link
Author

@giswqs Okay-- install fails with same error when I'm on university ethernet. Also, I can install packages like xarray one at a time successfully.

@giswqs
Copy link
Member

giswqs commented Apr 18, 2022

@jameshgrn This is an interesting issue. I have tested it on my macOS Monterey with both Python 3.8 and 3.9, both installations went smoothly. There are several conda couldn't resolve host name returned from Google Search results, but they are not useful. I am not sure if this is a conda/mamba issue, or something only occurs on a specific Mac.

image

@jameshgrn
Copy link
Author

@giswqs I agree! I also went down a few SO rabbit holes and didn't find much. I have a macbook air with the same OSX distro and I'll try it on that today. I'm sure it will work. I'll let you know if I find a solution in the next few days?

@jameshgrn
Copy link
Author

jameshgrn commented Apr 19, 2022

@giswqs Here is the package it consistently throws an error for at the end. Not sure if aenum is just the last package in the list?
RuntimeError: Download error (6) Couldn't resolve host name [https://conda.anaconda.org/conda-forge/noarch/aenum-3.1.11-pyhd8ed1ab_0.tar.bz2]

@giswqs
Copy link
Member

giswqs commented Apr 19, 2022

@giswqs Can you mamba install aenum first and then install geospatial to see if it can resolve the issue?

@jameshgrn
Copy link
Author

@giswqs bummer, no luck. I think im just gonna have conda solve it

@jameshgrn
Copy link
Author

@giswqs @datarocks Okay, I have my own environment with some basic packages (geopandas, sliderule, fiona etc) that is 3.10 python. I installed successfully geospatial into it with mamba. Seems either it was 3.9 or some weird interaction with my machine. Qiusheng, I'm cool with closing this issue unless you want to keep it open for others, let me know.

@giswqs
Copy link
Member

giswqs commented Apr 19, 2022

@jameshgrn Good to know you sorted it out. I have tested with Python 3.9 and 3.10, both worked fine. This is a weird issue I can't produce on my Linux and Mac machines. If others are experiencing the same issue, please feel free to comment down below.

@giswqs giswqs closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants