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

Install problem and conda #3838

Closed
prasadheeramani opened this issue Nov 8, 2016 · 4 comments
Closed

Install problem and conda #3838

prasadheeramani opened this issue Nov 8, 2016 · 4 comments
Labels
locked [bot] locked due to inactivity

Comments

@prasadheeramani
Copy link

Fetching package metadata ...An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

https://github.com/conda/conda/issues

Current conda install:

           platform : linux-64
      conda version : 4.2.9
   conda is private : False
  conda-env version : 4.2.9
conda-build version : 2.0.2
     python version : 3.5.2.final.0
   requests version : 2.11.1
   root environment : /home/heeramani/anaconda3  (writable)
default environment : /home/heeramani/anaconda3
   envs directories : /home/heeramani/anaconda3/envs
      package cache : /home/heeramani/anaconda3/pkgs
       channel URLs : https://repo.continuum.io/pkgs/free/linux-64/
                      https://repo.continuum.io/pkgs/free/noarch/
                      https://repo.continuum.io/pkgs/pro/linux-64/
                      https://repo.continuum.io/pkgs/pro/noarch/
        config file : None
       offline mode : False

$ /home/heeramani/anaconda3/bin/conda update conda

Traceback (most recent call last):
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 112, in fetch_repodata
    timeout=(3.05, 60))
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 390, in send
    conn = self.get_connection(request.url, proxies)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 290, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 184, in proxy_manager_for
    **proxy_kwargs
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 43, in SOCKSProxyManager
    raise InvalidSchema("Missing dependencies for SOCKS support.")
requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 287, in fetch_index
    repodatas = [(u, f.result()) for u, f in zip(urls, futures)]
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 287, in <listcomp>
    repodatas = [(u, f.result()) for u, f in zip(urls, futures)]
  File "/home/heeramani/anaconda3/lib/python3.5/concurrent/futures/_base.py", line 405, in result
    return self.__get_result()
  File "/home/heeramani/anaconda3/lib/python3.5/concurrent/futures/_base.py", line 357, in __get_result
    raise self._exception
  File "/home/heeramani/anaconda3/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 70, in func
    res = f(*args, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 137, in fetch_repodata
    .format(url, filename, e))
conda.exceptions.CondaRuntimeError: Runtime error: Invalid index file: https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2: Missing dependencies for SOCKS support.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 112, in fetch_repodata
    timeout=(3.05, 60))
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 390, in send
    conn = self.get_connection(request.url, proxies)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 290, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 184, in proxy_manager_for
    **proxy_kwargs
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/requests/adapters.py", line 43, in SOCKSProxyManager
    raise InvalidSchema("Missing dependencies for SOCKS support.")
requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/exceptions.py", line 473, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/cli/main.py", line 144, in _main
    exit_code = args.func(args, p)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/cli/main_update.py", line 65, in execute
    install(args, parser, 'update')
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/cli/install.py", line 238, in install
    prefix=prefix)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/api.py", line 24, in get_index
    index = fetch_index(channel_urls, use_cache=use_cache, unknown=unknown)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 293, in fetch_index
    for url in urls]
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 293, in <listcomp>
    for url in urls]
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 70, in func
    res = f(*args, **kwargs)
  File "/home/heeramani/anaconda3/lib/python3.5/site-packages/conda/fetch.py", line 137, in fetch_repodata
    .format(url, filename, e))
conda.exceptions.CondaRuntimeError: Runtime error: Invalid index file: https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2: Missing dependencies for SOCKS support.
@nehaljwani
Copy link
Contributor

@hmp68239 Could you please share output for the command: env | grep -i proxy

@nehaljwani
Copy link
Contributor

nehaljwani commented Nov 8, 2016

I could reproduce this like this:
In one tab, type:

ssh -D 9889 localhost

In some other tab:

export all_proxy=socks5://localhost:9889 # Could have used ALL_PROXY too

Download and install latest conda for python 3:

./Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/scratchconda

Activate and run conda install python:

source /tmp/scratchconda/bin/activate
conda install python
...
...
    conda.exceptions.CondaRuntimeError: Runtime error: Invalid index file: https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2: Missing dependencies for SOCKS support.

Fix: Install requests with socks support. (a.k.a PySocks?) Interestingly, this doesn't require access to internet, since it is already present, but not setup.

pip install -U requests[socks]

Now conda is happy.

@kalefranz
Copy link
Contributor

Yes, if you have configuration on your system that requests is recognizing for a socks proxy, you'll need to pip install -U pysocks. I don't think the default repo currently have a conda package for pysocks. Note the conda-forge pysocks version is one that's specifically noted to be not compatible with requests.

@github-actions
Copy link

github-actions bot commented Nov 5, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

3 participants