conda / conda

A system-level, binary package and environment manager running on all major operating systems and platforms.
https://docs.conda.io/projects/conda/
Other
6.37k stars 1.66k forks source link

HTTP 403 While updating packages #3323

Closed nikhilweee closed 8 years ago

nikhilweee commented 8 years ago

I couldn't use conda install or conda update or any such network related commands. I get the following error:

Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata ......
Error: HTTPError: 403 Client Error: Forbidden for url:
https://repo.continuum.io/pkgs/pro/linux-64/repodata.json.bz2:
https://repo.continuum.io/pkgs/pro/linux-64/

P.S. I'm able to access those links from a web browser using an SSH Tunnel, but not otherwise.

kalefranz commented 8 years ago

Can you retry a couple times? And if the problem persists please provide the full terminal session input and output.

On Aug 19, 2016, at 9:47 AM, Nikhil Verma notifications@github.com wrote:

I couldn't use `conda install

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nikhilweee commented 8 years ago

I've retried a couple of times, but still get the same error. Here's the terminal output

$ conda upgrade conda
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .....Error: HTTPError: 403 Client Error: Forbidden for url: https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2: https://repo.continuum.io/pkgs/free/linux-64/
kalefranz commented 8 years ago

Can you provide the output of

conda info -a

and

curl -I https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2
nikhilweee commented 8 years ago

Strange! curl works fine!

nikhil@spyder:~$ conda info -a
Current conda install:

             platform : linux-64
        conda version : 4.1.11
    conda-env version : 2.5.2
  conda-build version : 1.21.3
       python version : 3.5.1.final.0
     requests version : 2.10.0
     root environment : /home/nikhil/anaconda3  (writable)
  default environment : /home/nikhil/anaconda3
     envs directories : /home/nikhil/anaconda3/envs
        package cache : /home/nikhil/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
    is foreign system : False

# conda environments:
#
python2                  /home/nikhil/anaconda3/envs/python2
root                  *  /home/nikhil/anaconda3

sys.version: 3.5.1 |Anaconda custom (64-bit)| (defaul...
sys.prefix: /home/nikhil/anaconda3
sys.executable: /home/nikhil/anaconda3/bin/python3
conda location: /home/nikhil/anaconda3/lib/python3.5/site-packages/conda
conda-build: /home/nikhil/anaconda3/bin/conda-build
conda-convert: /home/nikhil/anaconda3/bin/conda-convert
conda-develop: /home/nikhil/anaconda3/bin/conda-develop
conda-env: /home/nikhil/anaconda3/bin/conda-env
conda-index: /home/nikhil/anaconda3/bin/conda-index
conda-inspect: /home/nikhil/anaconda3/bin/conda-inspect
conda-metapackage: /home/nikhil/anaconda3/bin/conda-metapackage
conda-pipbuild: /home/nikhil/anaconda3/bin/conda-pipbuild
conda-render: /home/nikhil/anaconda3/bin/conda-render
conda-server: /home/nikhil/anaconda3/bin/conda-server
conda-sign: /home/nikhil/anaconda3/bin/conda-sign
conda-skeleton: /home/nikhil/anaconda3/bin/conda-skeleton
user site dirs: ~/.local/lib/python3.5
                ~/.local/lib/python2.7

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: <not set>
CONDA_ENVS_PATH: <not set>
LD_LIBRARY_PATH: <not set>
PATH: /home/nikhil/anaconda3/bin:/home/nikhil/anaconda2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PYTHONHOME: <not set>
PYTHONPATH: <not set>

WARNING: could not import _license.show_info
# try:
# $ conda install -n root _license
nikhil@spyder:~$ curl -I https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 312169
Content-Type: application/octet-stream
Date: Fri, 19 Aug 2016 15:15:01 GMT
ETag: "57b70c2e-4c369"
Last-Modified: Fri, 19 Aug 2016 13:39:58 GMT
Server: nginx/1.8.1
Connection: keep-alive

nikhil@spyder:~$ 
kalefranz commented 8 years ago

I've seen this one other time. I still don't yet know the root cause. If you're willing to work with me though, I'd like to dig further...

I'm guessing you can't really do any install or update with conda right now, right? So something like conda install flask fails?

Start by using the latest conda-canary release. The logging is much better there.

conda config --add channels conda-canary
conda update conda

Now try that conda install flask command again. Except do

conda install flask -vv

to get all the debug output.

kalefranz commented 8 years ago

If the canary update doesn't work (should pull in conda version 4.2.4), after you run

conda config --add channels conda-canary

also run

conda config --remove channels defaults

Then try to update. Should work then.

nikhilweee commented 8 years ago

Thanks,

conda config --add channels conda-canary
conda config --remove channels defaults

worked for me!

UPDATE:

curl -I https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2

behaves inconsistently. I get HTTP 403 most of the times and sometimes HTTP 200 in between.

kalefranz commented 8 years ago

Do you mind sharing your IP address and location?

On Aug 20, 2016, at 7:39 AM, Nikhil Verma notifications@github.com wrote:

Thanks,

conda config --add channels conda-canary conda config --remove channels defaults worked for me!

UPDATE:

curl -I https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2 behaves inconsistently. I get HTTP 403 most of the times and sometimes HTTP 200 in between.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

nikhilweee commented 8 years ago

220.227.149.70 I'm on a university network in Pilani, RJ, India

Z-Shiyi commented 8 years ago

Or you can vi ~/.condarc file, add custom channels.

From: Nikhil Verma notifications@github.com Reply-To: conda/conda reply@reply.github.com Date: Saturday, August 20, 2016 at 20:39 To: conda/conda conda@noreply.github.com Subject: Re: [conda/conda] HTTP 403 While updating packages (#3323)

Thanks, conda config --add channels conda-canary conda config --remove channels defaults worked for me!

UPDATE: curl -I https://repo.continuum.io/pkgs/free/linux-64/repodata.json.bz2 behaves inconsistently. I get HTTP 403 most of the times and sometimes HTTP 200 in between.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nav10003 commented 7 years ago

I have a similar issue on Win7 Anaconda installation. Whenever I try to install a package or update anaconda I get the message: HTTPError: 403 Forbidden http://repo.continuum.io/pkgs/pro/win-64/ Here is conda info -a output: image

kalefranz commented 7 years ago

@nav10003 you're on a VERY old conda version. If conda update conda doesn't work, it might be easiest just to download a miniconda or anaconda installer and start again.

michealsding commented 7 years ago

try pip install seaborn

nishankmahore commented 7 years ago

Install MiniConda sh Miniconda2-latest-Linux-x86_64.sh -f In the same folder of previous conda It will solve all conad related problem

Works for me as charm

elmarmol commented 7 years ago

So you can update conda or download packages, you only need to disable antivirus

mehdi395 commented 3 years ago

conda config --remove channels "defaults" worked for me!