Hi
Following the docu, running
$ conda update --name base conda
$ git clone https://github.com/ESMValGroup/ESMValTool.git
$ cd ESMValTool
$ conda activate esmvaltool
$ conda env update --name esmvaltool --file environment.yml
# everything worked so far
$ pip install .
yields the error
Processing </path>/ESMValTool
ERROR: Could not install packages due to an EnvironmentError:
[('</path>/ESMValTool/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.pack', '/tmp/pip-req-build-mgrjuxvi/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.pack',
"[Errno 13] Permission denied: '/tmp/pip-req-build-mgrjuxvi/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.pack'"), ('</path>/ESMValTool/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.idx', '/tmp/pip-req-build-mgrjuxvi/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.idx',
"[Errno 13] Permission denied: '/tmp/pip-req-build-mgrjuxvi/.git/objects/pack/pack-2a751c752bafd7ba3bee4c999453af677b36615b.idx'")]
Note that $ pip install --user . yields the same error.
Unfortunately I am a newbie to the pip/conda universe so I probably made a stupid mistake.
Thanks for any help and happy Xmas,
Chris
$ conda --version
conda 4.8.0
$ pip --version
pip 19.3.1 from </path>/conda_envs/esmvaltool/lib/python3.7/site-packages/pip (python 3.7)
Potentially just you trying to simplify things, but is /path/ESMValTool copy/paste? If not, that鈥檚 your problem...
no thats not the problem...
It looks like you're updating an older conda environment. You might want to try creating a new conda environment, because updating older environments does not always work as expected. You can remove the old environment by running conda env remove -n esmvaltool. Since you're installing from source, you could also try to use these (shorter, but similar) instructions: https://github.com/ESMValGroup/ESMValTool/blob/version2_development/CONTRIBUTING.md#getting-started
are you on a machine where you don't have super user credentials? If so, are you using the system pip and not the locally installed pip in the esmvaltool environment? Fairly sure the answer to both thse questions is yes, since it tries to install in /tmp where you dont have write permissions. If so, you either need to use the --user flag for pip install (see eg https://stackoverflow.com/questions/50807507/could-not-install-packages-due-to-a-environment-error-error-13-permission-d ) or install pip locally and make sure you use that one :beer:
To follow up from @valeriupredoi, try:
$ which pip
And you should see something pointing to your Conda installation. If not, you may need conda install pip (although this normally happens automatically, unless you have an old Conda version)
...or stop by my office tomorrow and we can figure it out, and potentially recommend a documentation update for the ESMValTool group 馃槉
You are all partially right: turned out the problem was a conflict between the system-wide conda installation and my personal miniconda installation which I wanted to use (I had two conda bins in $PATH and the wrong was used).
Thanks for your help,
Chris
Good stuff! cheers :beer:
Most helpful comment
You are all partially right: turned out the problem was a conflict between the system-wide conda installation and my personal miniconda installation which I wanted to use (I had two conda bins in
$PATHand the wrong was used).Thanks for your help,
Chris