1

I'm trying to use Miniconda3 to create an environment and install packages to it.

Here is my current process:

  • Open Miniconda3 prompt
  • conda create --name env
  • conda activate env
  • conda install h5py

Here is the output:


Downloading and Extracting Packages
hdf5-1.10.4          | 7.9 MB    |                                                                              |   0% etc....

ChecksumMismatchError: Conda detected a mismatch between the expected content and downloaded content
for url 'https://repo.anaconda.com/pkgs/main/win-64/hdf5-1.10.4-h7ebc959_0.conda'.
  download saved to: C:\Users\user\Miniconda3\pkgs\hdf5-1.10.4-h7ebc959_0.conda
  expected sha256: aac32deb60d5cff5640ca39a772d8bb937a334a7a0f37e91235c9a4de9b925f0
  actual sha256: c80bea1ea77e281271818e00a0953926129f9edbe44a46fa287570d34a3d0084

My thoughts:

  • The link in the output works completely fine, I can access this page and then install this file locally. My initial concern was that I am using a corporate proxy, but this has worked fine before and the fact I can utilise the exact same proxy to download the files from my web browser suggests this is not the root cause.
  • I have setup my proxy using the following .condarc file:
--- # .condarc file for configuring miniconda
proxy_servers: 
    http: http://user:password@proxy.internet.company.local:8080
    https: https://user:password@proxy.internet.company.local:8080
ssl_verify: False
...
  • None of the files get to anymore than 0% downloaded
  • The "actual sha256" repeatedly changes on each attempt, why would this be?
  • Is there a way to just disable the sha256 checksum if I know these packages are safe?

This is causing a huge delay to my work so any help would be hugely appreciated, even comments of anyone with similar issues.

  • Can you download the file from browser? Does it have `aac32de...` hash? You can check its hash with `shasum -a 256 hdf5-1.10.4-h7ebc959_0.conda` – fdermishin Nov 24 '20 at 17:50
  • @user13044086, I checked the hash with: pip hash "C:\Users\user\Downloads\hdf5-1.10.4-h7ebc959_0.conda". I got the following result: --hash=sha256:aac32deb60d5cff5640ca39a772d8bb937a334a7a0f37e91235c9a4de9b925f0. So the hash is correct no? – Fabian McGibbon Nov 25 '20 at 08:41
  • Yes, it is the correct one. In this case you can compare files `C:\Users\user\Miniconda3\pkgs\hdf5-1.10.4-h7ebc959_0.conda` and `C:\Users\user\Downloads\hdf5-1.10.4-h7ebc959_0.conda` to figure out, what is getting changed when conda downloads this file. .conda file format is just .tar.bz2 archive, so you need to unpack it first to figure out, which files have changed inside of it – fdermishin Nov 25 '20 at 10:24
  • Take a look at these questions if you need a tool for file comparison in Windows https://stackoverflow.com/questions/8166697/tool-for-comparing-2-binary-files-in-windows https://softwarerecs.stackexchange.com/questions/34769/windows-software-to-compare-thousands-of-files-byte-by-byte – fdermishin Nov 25 '20 at 10:29
  • 2
    I suspect you're not getting through the proxy correctly and what you end up hashing is the error response from the server, which if it includes a time stamp would explain the changing hash. That is, I don't think checking the download directly is helping you any. I'd try running the command with verbosity flags (`-v`) to see if debug info is useful, e.g., `conda install -vvv h5py`. – merv Nov 25 '20 at 14:39
  • @user13044086 great idea, had no idea you could just extract these files... This seems to have helped a bit as when accessing the link through a browser they are unpacked fine, however the one in my Miniconda3\pkgs fails to, and I've noticed it is only a measly 5KB compared to 83KB from the manually downloaded file. – Fabian McGibbon Nov 25 '20 at 14:47
  • 1
    @merv cheers merv also didn't know you could get more verbose output with conda. There's a lot given but I'm wary of posting anything that may be sensitive to my company. However the main lines that seem to be the crux of the issue are below: DEBUG urllib3.connectionpool:_new_conn(939): Starting new HTTPS connection (1): block.opendns.com:443. This url takes me to a blocked page by my company security so this is evidently the problem. I am however puzzled at how I would be able to find the url it was attempting to access that cause this. – Fabian McGibbon Nov 25 '20 at 14:51
  • @FabianMcGibbon yes that sounds like the issue. Unfortunately, I don't have experience with this, so hopefully others can step in, or perhaps ask your IT department. – merv Nov 25 '20 at 15:00

0 Answers0