I was trying to use the existing environment.yml
to create a new conda env like so:
conda env create --file environment.yml
and it failed after the downloads like so:
[...]
libtiff-4.2.0 | 502 KB | ######################################################################### | 100%
torchvision-0.12.0 | 27.5 MB | ######################################################################### | 100%
libwebp-1.2.2 | 80 KB | ######################################################################### | 100%
libuv-1.40.0 | 736 KB | ######################################################################### | 100%
libffi-3.3 | 50 KB | ######################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: \ By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html
done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/home/maye/miniconda3/envs/fastbook/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/maye/Dropbox/src/fastbook/condaenv.58ah5v14.requirements.txt']
Pip subprocess output:
Pip subprocess error:
ERROR: Exception:
Traceback (most recent call last):
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 286, in run
reqs = self.get_requirements(args, options, finder, session)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 384, in get_requirements
for parsed_req in parse_requirements(
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 135, in parse_requirements
for parsed_line in parser.parse(filename, constraint):
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 319, in parse
yield from self._parse_and_recurse(filename, constraint)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 348, in _parse_and_recurse
yield from self._parse_and_recurse(req_path, nested_constraint)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 324, in _parse_and_recurse
for line in self._parse_file(filename, constraint):
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 353, in _parse_file
_, content = get_file_content(filename, self._session)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/req/req_file.py", line 518, in get_file_content
resp = session.get(url)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_internal/network/session.py", line 454, in request
return super().request(method, url, *args, **kwargs)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 697, in send
r.content
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_vendor/requests/models.py", line 836, in content
self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
File "/home/maye/miniconda3/envs/fastbook/lib/python3.10/site-packages/pip/_vendor/requests/models.py", line 769, in generate
chunk = self.raw.read(chunk_size)
AttributeError: 'FileNotFoundError' object has no attribute 'read'
failed
CondaEnvException: Pip failed
(This was with Python 3.10, I think that’s picked up from whatever the currently active env uses when creating the env?)
Did anybody see the same and found a way around it?