Recently I needed to use an environment that did not reside in /home/me/miniconda3/envs. I ran out of disk quota and wanted to store the environment on the local /scratch folder on my workstation. Hence, I used
me@machine ~ $ conda create -p /scratch/envs/bigenv <lots of packages>
to create the environment. The conda way to activate it would be
Such an environment can not be activated with Xonda, since its path can not be found in the config.envs_dirs variable. I added a check if the given environment name is an existing path with a bin folder. I created a pull request to fix this.
Potential problems:
The added path stays in the config.envs_dirs.
If the custom path contains a folder that shares a name with an environment in a standard env folder, activating the custom env works (the custom env dir has not yet been added) but deactivating it raises an exception for duplicate names in _get_envs.
What is not yet working:
The conda info command does not work yet. When calling conda info, xonda should pipe the command through to conda. This works, but conda looks at the wrong path. I am not sure why:
# in bash
me@machine:~$ source activate /scratch/envs/bigenv/
(/scratch/envs/bigenv/) me@machine:~$ conda list
# packages in environment at /scratch/envs/bigenv:
#
ca-certificates 2017.7.27.1 0 conda-forge
certifi 2017.7.27.1 py27_0 conda-forge
ncurses 5.9 10 conda-forge
openssl 1.0.2l 0 conda-forge
pip 9.0.1 py27_0 conda-forge
python 2.7.13 1 conda-forge
readline 6.2 0 conda-forge
setuptools 36.3.0 py27_0 conda-forge
sqlite 3.13.0 1 conda-forge
tk 8.5.19 2 conda-forge
wheel 0.29.0 py27_0 conda-forge
zlib 1.2.11 0 conda-forge
(/scratch/envs/bigenv/) me@machine:~$ source deactivate
me@machine:~$
# switching to xonsh
me@machine:~$ xonsh
me@machine ~ $ conda activate /scratch/envs/bigenv/
(bigenv) me@machine ~ $ conda list
CondaEnvironmentNotFoundError: Could not find environment: /home/me/miniconda3/envs/bigenv .
You can list all discoverable environments with `conda info --envs`.
(bigenv) me@machine ~ $ /scratch/envs/bigenv/bin/conda list
CondaEnvironmentNotFoundError: Could not find environment: /home/me/miniconda3/envs/bigenv .
You can list all discoverable environments with `conda info --envs`.
(bigenv) me@machine ~ [1]$
Please note that this env uses Python 2.7 to better distinguish it from my other environments.
Recently I needed to use an environment that did not reside in
/home/me/miniconda3/envs
. I ran out of disk quota and wanted to store the environment on the local/scratch
folder on my workstation. Hence, I usedto create the environment. The conda way to activate it would be
Such an environment can not be activated with Xonda, since its path can not be found in the
config.envs_dirs
variable. I added a check if the given environment name is an existing path with a bin folder. I created a pull request to fix this.Potential problems:
config.envs_dirs
._get_envs
.What is not yet working:
The
conda info
command does not work yet. When callingconda info
, xonda should pipe the command through to conda. This works, but conda looks at the wrong path. I am not sure why:Please note that this env uses Python 2.7 to better distinguish it from my other environments.