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

micromamba cannot install pip items from '/home/xx.yml' #3021

Closed
3 tasks done
galaxy001 opened this issue Nov 29, 2023 · 6 comments
Closed
3 tasks done

micromamba cannot install pip items from '/home/xx.yml' #3021

galaxy001 opened this issue Nov 29, 2023 · 6 comments

Comments

@galaxy001
Copy link

galaxy001 commented Nov 29, 2023

Troubleshooting docs

  • My problem is not solved in the Troubleshooting docs

Anaconda default channels

  • I do NOT use the Anaconda default channels (pkgs/* etc.)

How did you install Mamba?

"${SHELL}" <(curl -L micro.mamba.pm/install.sh)   # all questions answered with Enter key
source ~/.bashrc

Search tried in issue tracker

is:issue is:open pip home

Latest version of Mamba

  • My problem is not solved with the latest version

Tried in Conda?

Tried with conda and mamba, both work correctly.

Describe your issue

micromamba env create -f /home/test.yml will fail if pip items defined.

The same yaml file works from ~/test.yaml.

Both version 1.5.3 and version 1.5.1 have this bug.

I tried micromamba self-update --version 1.5.1 -c conda-forge since another PC is using 1.5.1.

Transaction finished

To activate this environment, use:

    micromamba activate test

Or to execute a single command in this environment, use:

    micromamba run -n test mycommand

error    libmamba Error opening for writing "/home/mambaff4VeDZdgZQ": Permission denied
error    libmamba Error opening for writing "/home/mambaff4VeDZdgZQ": Permission denied

Installing pip packages: pyfastx
ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/home/mambaff4VeDZdgZQ'

mamba info / micromamba info

$ micromamba info

       libmamba version : 1.5.1
     micromamba version : 1.5.1
           curl version : libcurl/7.88.1 OpenSSL/3.1.2 zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.52.0
     libarchive version : libarchive 3.6.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.2
       envs directories : /home/micro/micromamba/envs
          package cache : /home/micro/micromamba/pkgs
                          /home/micro/.mamba/pkgs
            environment : None (not found)
           env location : -
      user config files : /home/micro/.mambarc
 populated config files :
       virtual packages : __unix=0=0
                          __linux=5.15.0=0
                          __glibc=2.35=0
                          __archspec=1=x86_64
               channels :
       base environment : /home/micro/micromamba
               platform : linux-64

Logs

$ micromamba env create -v -f /home/test.yml
Found conda-prefix at '/home/micro/micromamba/envs/test'. Overwrite?: [y/N] y
info     libmamba Parsing MatchSpec python
info     libmamba Parsing MatchSpec pip
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/linux-64/repodata.json'
conda-forge/linux-64                                        Using cache
info     libmamba Searching index cache file for repo 'https://conda.anaconda.org/conda-forge/noarch/repodata.json'
conda-forge/noarch                                          Using cache
info     libmamba All targets to download are cached
info     libmamba All targets to download are cached
info     libmamba Reading cache files '/home/micro/micromamba/pkgs/cache/497deca9.solv.*' for repo index 'conda-forge/linux-64'
info     libmamba Attempting to read libsolv solv file "/home/micro/micromamba/pkgs/cache/497deca9.solv" for repo conda-forge/linux-64
info     libmamba Expecting solv metadata : {"etag":"\"60446556246bb3a71d971be10e3a7731\"","mod":"Wed, 29 Nov 2023 10:52:32 GMT","pip_added":true,"tool_version":"1.3_0.7.24","url":"https://conda.anaconda.org/conda-forge/linux-64"}
info     libmamba Loaded solv metadata : {"etag":"\"60446556246bb3a71d971be10e3a7731\"","mod":"Wed, 29 Nov 2023 10:52:32 GMT","pip_added":true,"tool_version":"1.3_0.7.24","url":"https://conda.anaconda.org/conda-forge/linux-64"}
info     libmamba Metadata from solv are valid, loading successful
info     libmamba Reading cache files '/home/micro/micromamba/pkgs/cache/09cdf8bf.solv.*' for repo index 'conda-forge/noarch'
info     libmamba Attempting to read libsolv solv file "/home/micro/micromamba/pkgs/cache/09cdf8bf.solv" for repo conda-forge/noarch
info     libmamba Expecting solv metadata : {"etag":"\"c940da299061546f30fb18f938383e17\"","mod":"Wed, 29 Nov 2023 10:25:31 GMT","pip_added":true,"tool_version":"1.3_0.7.24","url":"https://conda.anaconda.org/conda-forge/noarch"}
info     libmamba Loaded solv metadata : {"etag":"\"c940da299061546f30fb18f938383e17\"","mod":"Wed, 29 Nov 2023 10:25:31 GMT","pip_added":true,"tool_version":"1.3_0.7.24","url":"https://conda.anaconda.org/conda-forge/noarch"}
info     libmamba Metadata from solv are valid, loading successful
info     libmamba Adding package record to repo __archspec
info     libmamba Adding package record to repo __glibc
info     libmamba Adding package record to repo __linux
info     libmamba Adding package record to repo __unix
info     libmamba Parsing MatchSpec python
info     libmamba Parsing MatchSpec python
info     libmamba Adding job: python
info     libmamba Parsing MatchSpec pip
info     libmamba Parsing MatchSpec pip
info     libmamba Adding job: pip
info     libmamba Problem count: 0
info     libmamba Found python version in packages to be installed 3.12.0

Transaction

  Prefix: /home/micro/micromamba/envs/test

  Updating specs:

   - python
   - pip


  Package                Version  Build               Channel           Size
──────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────

  + _libgcc_mutex            0.1  conda_forge         conda-forge     Cached
  + ld_impl_linux-64        2.40  h41732ed_0          conda-forge     Cached
  + ca-certificates   2023.11.17  hbcca054_0          conda-forge     Cached
  + libgomp               13.2.0  h807b86a_3          conda-forge     Cached
  + _openmp_mutex            4.5  2_gnu               conda-forge     Cached
  + libgcc-ng             13.2.0  h807b86a_3          conda-forge     Cached
  + openssl                3.2.0  hd590300_1          conda-forge     Cached
  + libzlib               1.2.13  hd590300_5          conda-forge     Cached
  + libnsl                 2.0.1  hd590300_0          conda-forge     Cached
  + libffi                 3.4.2  h7f98852_5          conda-forge     Cached
  + bzip2                  1.0.8  hd590300_5          conda-forge     Cached
  + ncurses                  6.4  h59595ed_2          conda-forge     Cached
  + libuuid               2.38.1  h0b41bf4_0          conda-forge     Cached
  + libexpat               2.5.0  hcb278e6_1          conda-forge     Cached
  + xz                     5.2.6  h166bdaf_0          conda-forge     Cached
  + tk                    8.6.13  noxft_h4845f30_101  conda-forge     Cached
  + libsqlite             3.44.2  h2797004_0          conda-forge     Cached
  + readline                 8.2  h8228510_1          conda-forge     Cached
  + tzdata                 2023c  h71feb2d_0          conda-forge     Cached
  + python                3.12.0  hab00c5b_0_cpython  conda-forge     Cached
  + wheel                 0.42.0  pyhd8ed1ab_0        conda-forge     Cached
  + setuptools            68.2.2  pyhd8ed1ab_0        conda-forge     Cached
  + pip                   23.3.1  pyhd8ed1ab_0        conda-forge     Cached

  Summary:

  Install: 23 packages

  Total download: 0 B

──────────────────────────────────────────────────────────────────────────────


Confirm changes: [Y/n]
info     libmamba Cleaned 0 .mamba_trash files. 0 remaining.

Transaction starting
info     libmamba All targets to download are cached
Linking _libgcc_mutex-0.1-conda_forge
Linking ld_impl_linux-64-2.40-h41732ed_0
Linking ca-certificates-2023.11.17-hbcca054_0
Linking libgomp-13.2.0-h807b86a_3
Linking _openmp_mutex-4.5-2_gnu
Linking libgcc-ng-13.2.0-h807b86a_3
Linking openssl-3.2.0-hd590300_1
Linking libzlib-1.2.13-hd590300_5
Linking libnsl-2.0.1-hd590300_0
Linking libffi-3.4.2-h7f98852_5
Linking bzip2-1.0.8-hd590300_5
Linking ncurses-6.4-h59595ed_2
Linking libuuid-2.38.1-h0b41bf4_0
Linking libexpat-2.5.0-hcb278e6_1
Linking xz-5.2.6-h166bdaf_0
Linking tk-8.6.13-noxft_h4845f30_101
Linking libsqlite-3.44.2-h2797004_0
Linking readline-8.2-h8228510_1
Linking tzdata-2023c-h71feb2d_0
Linking python-3.12.0-hab00c5b_0_cpython
Linking wheel-0.42.0-pyhd8ed1ab_0
info     libmamba Running wrapped python compilation command /home/micro/micromamba/envs/test/bin/python3.12 -Wi -u /tmp/mambafvehiAqderD
info     libmamba Compiling 27 files to pyc
Linking setuptools-68.2.2-pyhd8ed1ab_0
info     libmamba Compiling 219 files to pyc
Linking pip-23.3.1-pyhd8ed1ab_0
info     libmamba Compiling 495 files to pyc
info     libmamba Waiting for pyc compilation to finish

Transaction finished

To activate this environment, use:

    micromamba activate test

Or to execute a single command in this environment, use:

    micromamba run -n test mycommand

info     libmamba Opening history file: "/home/micro/micromamba/envs/test/conda-meta/history"
error    libmamba Error opening for writing "/home/mambafeihkdFha1g": Permission denied
error    libmamba Error opening for writing "/home/mambafeihkdFha1g": Permission denied

Installing pip packages: pyfastx
info     libmamba Calling: /home/micro/micromamba/envs/test/bin/python -m pip install -r /home/mambafeihkdFha1g --no-input
ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/home/mambafeihkdFha1g'
critical libmamba pip failed to install packages

environment.yml

$ cat /home/test.yml
name: test
channels:
  - conda-forge
  - nodefaults
dependencies:
  - python
  - pip
  - pip:
      - pyfastx

~/.condarc

$ cat ~/.condarc
cat: /home/micro/.condarc: No such file or directory
@jonashaag
Copy link
Contributor

Do you have write permissions in /home?

@galaxy001
Copy link
Author

galaxy001 commented Nov 29, 2023

No.
That is a newly created VPS of ubuntu 22.04.

So the temp path will be set from -f ?
Might be better to use someplace inside the environments path, like envs/eeee/mambafeihkdFha1g.

@jonashaag
Copy link
Contributor

Seems like writing the temporary file to the same directory as the environment yml file is a special accommodation for pip limitations #2241

@jonashaag
Copy link
Contributor

I don't think we can change this

You might want to contribute pyfastx to conda-forge though!

@jonashaag jonashaag closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@galaxy001
Copy link
Author

galaxy001 commented Nov 29, 2023

But it works with conda and mamba.
Any pip packages will trigger this situation.

@jonashaag
Copy link
Contributor

If you find a solution that doesn't break #2241, please feel free to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants