0
$\begingroup$

In kaggle comp I try to store all the packages to build them later without internet connection.

At first I use freeze to get packages, then download. Problem is, that despite 'freeze' show us /home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work, 'download' refuses to see it. Why? How to solve the problem or there is another way to store packages?

!pip freeze > requirements.txt

Output

...
absl-py==1.4.0
aplus==0.11.0
appdirs==1.4.4
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work
argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1666850768662/work
...
!pip download -r requirements.txt --no-deps -d package_files

Output

Processing /home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work (from -r requirements.txt (line 18))
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/commands/download.py", line 132, in run
    requirement_set = resolver.resolve(reqs, check_supported_wheels=True)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
    req = self._make_requirement_from_install_req(
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 293, in __init__
    super().__init__(
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 304, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 516, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 587, in _prepare_linked_requirement
    local_file = unpack_url(
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 176, in unpack_url
    unpack_file(file.path, location, file.content_type)
  File "/opt/conda/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 243, in unpack_file
    or tarfile.is_tarfile(filename)
  File "/opt/conda/lib/python3.10/tarfile.py", line 2780, in is_tarfile
    t = open(name)
  File "/opt/conda/lib/python3.10/tarfile.py", line 1797, in open
    return func(name, "r", fileobj, **kwargs)
  File "/opt/conda/lib/python3.10/tarfile.py", line 1863, in gzopen
    fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
  File "/opt/conda/lib/python3.10/gzip.py", line 174, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work'
$\endgroup$
3
  • $\begingroup$ Can you say more about what you're trying to do? You can't access /home/conda from a notebook. $\endgroup$
    – JohnM
    Aug 19, 2023 at 15:49
  • $\begingroup$ @JohnM I try to download all installed libs into package_files !pip freeze > requirements.txt !pip download -r requirements.txt --no-deps -d package_files $\endgroup$
    – XEX
    Aug 20, 2023 at 16:14
  • $\begingroup$ Sure. Do you want to install these packages on a local machine that doesn;t have internet, or use them in another Kaggle competition somehow, or something else? $\endgroup$
    – JohnM
    Aug 24, 2023 at 19:05

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.