7

I am trying to create a new environment for Python through Anaconda. But the error keeps coming out saying :

Solving environment: failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    OSError: [Errno 122] Disk quota exceeded

I am using the sentence below to create the new environment:

conda create --name cpost python=2.7 numpy=1.9

I understand that this might be related to the working directory, which is really limited in disk quota. So I copied the Anaconda directory fully to a larger disk-quota directory, and tried to create again. The same error came out. As I checked the error information, I noticed the following lines:

$ /nuist/u/home/liangxz/anaconda3/bin/conda create --name cpost python=2.7 numpy=1.9`

  environment variables:
                 CIO_TEST=<not set>
               CONDA_ROOT=/nuist/u/home/liangxz/anaconda3
               MODULEPATH=/nuist/p/public/app/Modules/modulefiles/app:/nuist/p/public/app/Module
                          s/modulefiles/compiler:/nuist/p/public/app/Modules/modulefiles/lib:/nu
                          ist/p/public/app/Modules/modulefiles/mpi
                     PATH=/nuist/u/home/liangxz/anaconda3/bin:/nuist/p/public/intel/compilers_an
                          d_libraries_2018.0.128/linux/bin/intel64:/nuist/p/public/intel/compile
                          rs_and_libraries_2018.0.128/linux/mpi/intel64/bin:/nuist/p/public/pgi/
                          linux86-64/17.10/bin:/nuist/p/public/pgi/linux86-64/17.10/bin:/opt/xca
                          t/bin:/opt/xcat/sbin:/opt/xcat/share/xcat/tools:/usr/lib64/qt-3.3/bin:
                          /opt/confluent/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/
                          opt/ibutils/bin:/usr/lpp/mmfs/bin:/root/bin:/opt/pbs/default/bin:/nuis
                          t/u/home/liangxz/.local/bin:/nuist/u/home/liangxz/bin
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : None
       user config file : /nuist/u/home/liangxz/.condarc
 populated config files :
          conda version : 4.5.4
    conda-build version : 3.10.5
         python version : 3.6.5.final.0
       base environment : /nuist/u/home/liangxz/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/free/linux-64
                          https://repo.anaconda.com/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/pro/linux-64
                          https://repo.anaconda.com/pkgs/pro/noarch
          package cache : /nuist/u/home/liangxz/anaconda3/pkgs
                          /nuist/u/home/liangxz/.conda/pkgs
       envs directories : /nuist/u/home/liangxz/anaconda3/envs
                          /nuist/u/home/liangxz/.conda/envs
               platform : linux-64
             user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/3.10.0-514.el7.x86_64 centos/7 glibc/2.17
                UID:GID : 1135:1135
             netrc file : None
           offline mode : False

I realized that the "user config file" is /nuist/u/home/liangxz/.condarc, and the "base environment" is "/nuist/u/home/liangxz/anaconda3 (writable)", which means even I copied an anaconda to a larger quota directory, the "writable directory" did not change and remained the small quota directory.(/nuist/u/home/liangxz/ is the small quota directory)

So my question here is how can I change the "base environments" and "envs directories" to the desired larger quota directory? Can I change it directly through some fixings? Or I must install Anaconda again in the bigger directory?

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Felix Douglas
  • 71
  • 1
  • 1
  • 2
  • I'd be a bit worried that the hardlinking Conda does under the hood could have an issue just moving the whole folder to a new disk like this. I'm not clear on what the behavior would be, possibly you actually expanded the size of the Anaconda install even further, or you still have links back to the small quota disk, i.e., you didn't actually free any space. Maybe you can check `du -sh envs/*` and compare it to `du -sh pkgs envs/*`. They should come out differently if hardlinks are still active, but that still won't say where they link. – merv Apr 27 '19 at 20:41
  • Thank you for your reply. I figured out how everything goes wrong yesterday. The command `conda` was set in the .bashrc file as `export PATH="/nuist/u/home/liangxz/anaconda3/bin:$PATH"`, that means every time I tried to use the conda command, I actually used the anaconda3 installed in the small quota disk and the new env was about to be created in the small disk; even I copied a folder to the larger quota disk, which is useless at all. I then installed anaconda in the big quota disk and added the correct PATH in the bashrc file, problem was solved then. – Felix Douglas Apr 28 '19 at 02:54
  • BTW, you shouldn't be setting PATH like that manually since Conda v4.4. https://stackoverflow.com/a/55526573/570918 – merv Apr 28 '19 at 03:02

2 Answers2

1

Try following this official anaconda answer that enables adding different directories as your conda cache. I added a different directory where I had more space available and it solved the issue.

Shir
  • 1,571
  • 2
  • 9
  • 27
  • 1
    The link you shared requires that I create an account on anaconda and hopefully get redirected to the right page with the content. Any chance you could improve your answer and describe step-by-step what should be done? Thanks! – Shailen Jul 21 '23 at 21:04
-1

I solved this by deleting some of my conda environments. You can find all environments by typing conda env list in the terminal. This will show all environments with their names and paths. Select an environment that you are prepared to remove and type: rm -r <<Path to that environment>>.

Warning: This will delete that environment permanently, so choose wisely.

mikey
  • 1,066
  • 9
  • 17