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

White spaces not allowed in installation path #593

Open
Harlool opened this issue May 15, 2024 · 8 comments
Open

White spaces not allowed in installation path #593

Harlool opened this issue May 15, 2024 · 8 comments
Labels
question Further information is requested windows

Comments

@Harlool
Copy link

Harlool commented May 15, 2024

Comment:

Hello,

In our corporate policies, Windows software are only allowed to be installed in "Program Files" so it's not possible to install miniforge as white spaces are not allowed in installation path (compared to Anaconda that allows it with a warning).

Is there any chance miniforge will also allow white spaces (with a warning) in the future ?

Or did miniforge allowed it before and was changed to refuse white spaces at some point ? If it's the case, which is the latest version of miniforge allowing white spaces in installation path ?

Thank you.

@Harlool Harlool added the question Further information is requested label May 15, 2024
@jaimergp
Copy link
Member

From 3.4.0, constructor has a setting to allow spaces in paths. It's a single line change in construct.yaml.

check_path_spaces: false

@hmaarrfk
Copy link
Contributor

That's amazing!!!!

Have you tested that the resulting installation is functional?

@jaimergp
Copy link
Member

Recent conda versions do tolerate spaces in paths, so it should be ok. Anaconda itself seems to be using this option, according to OP.

@hmaarrfk
Copy link
Contributor

i see. i guess i'm more scare of activate / deactivate scripts not being tested with whitespace. so an "early failure" is better than a late failure in my world, but i'm ok if it comes with a huge warning.

Windows has made it harder to avoid a space in your home path.

I've recreated my users a few times on some computers here and there since it owuld show up as

C:\Users\First Last

@emlys
Copy link

emlys commented Nov 6, 2024

Could you share any more info about building the installer to allow spaces? I cloned this repo, added the line check_path_spaces: false to construct.yaml, and ran build_miniforge_osx.sh. It failed with RuntimeError: 'check_path_spaces=False' cannot be used on Linux and macOS installers if 'conda' is present in the 'base' environment.

Full output
$ TARGET_PLATFORM=osx-64 bash build_miniforge_osx.sh 
+ set +u
++ PS1=
++ conda shell.posix activate
+ eval '. "/Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/proj4-deactivate.sh"
. "/Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/libxml2_deactivate.sh"
. "/Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/libglib_deactivate.sh"
. "/Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/geotiff-deactivate.sh"
. "/Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/gdal-deactivate.sh"
PS1='\''(base) '\''
export PATH='\''/Users/emily/miniforge3/bin:/usr/local/opt/node@20/bin:/usr/local/opt/node@18/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/openjdk@8/bin:/Users/emily/.rbenv/shims:/Applications/Sublime Text (4126).app/Contents/SharedSupport/bin:/opt/homebrew/bin:/Users/emily/miniforge3/condabin:/Users/emily/.yarn/bin:/Users/emily/.config/yarn/global/node_modules/.bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin'\''
export CONDA_PREFIX='\''/Users/emily/miniforge3'\''
export CONDA_SHLVL='\''3'\''
export CONDA_DEFAULT_ENV='\''base'\''
export CONDA_PROMPT_MODIFIER='\''(base) '\''
export CONDA_PREFIX_2='\''/Users/emily/miniconda3/envs/main'\''
export CONDA_EXE='\''/Users/emily/miniforge3/bin/conda'\''
export _CE_M='\'''\''
export _CE_CONDA='\'''\''
export CONDA_PYTHON_EXE='\''/Users/emily/miniforge3/bin/python'\''
. "/Users/emily/miniforge3/etc/conda/activate.d/libglib_activate.sh"
. "/Users/emily/miniforge3/etc/conda/activate.d/libxml2_activate.sh"'
++ . /Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/proj4-deactivate.sh
+++ unset PROJ_LIB
+++ unset PROJ_NETWORK
+++ '[' -n '' ']'
++ . /Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/libxml2_deactivate.sh
+++ test -n ''
+++ unset XML_CATALOG_FILES
+++ unset xml_catalog_files_libxml2
++ . /Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/libglib_deactivate.sh
+++ export GSETTINGS_SCHEMA_DIR=
+++ GSETTINGS_SCHEMA_DIR=
+++ unset GSETTINGS_SCHEMA_DIR_CONDA_BACKUP
+++ '[' -z ']'
+++ unset GSETTINGS_SCHEMA_DIR
++ . /Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/geotiff-deactivate.sh
+++ unset GEOTIFF_CSV
+++ [[ -n '' ]]
++ . /Users/emily/miniconda3/envs/main/etc/conda/deactivate.d/gdal-deactivate.sh
+++ unset GDAL_DATA
+++ [[ -n '' ]]
+++ unset GDAL_DRIVER_PATH
+++ [[ -n '' ]]
+++ unset CPL_ZIP_ENCODING
++ PS1='(base) '
++ export 'PATH=/Users/emily/miniforge3/bin:/usr/local/opt/node@20/bin:/usr/local/opt/node@18/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/openjdk@8/bin:/Users/emily/.rbenv/shims:/Applications/Sublime Text (4126).app/Contents/SharedSupport/bin:/opt/homebrew/bin:/Users/emily/miniforge3/condabin:/Users/emily/.yarn/bin:/Users/emily/.config/yarn/global/node_modules/.bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin'
++ PATH='/Users/emily/miniforge3/bin:/usr/local/opt/node@20/bin:/usr/local/opt/node@18/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/openjdk@8/bin:/Users/emily/.rbenv/shims:/Applications/Sublime Text (4126).app/Contents/SharedSupport/bin:/opt/homebrew/bin:/Users/emily/miniforge3/condabin:/Users/emily/.yarn/bin:/Users/emily/.config/yarn/global/node_modules/.bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin'
++ export CONDA_PREFIX=/Users/emily/miniforge3
++ CONDA_PREFIX=/Users/emily/miniforge3
++ export CONDA_SHLVL=3
++ CONDA_SHLVL=3
++ export CONDA_DEFAULT_ENV=base
++ CONDA_DEFAULT_ENV=base
++ export 'CONDA_PROMPT_MODIFIER=(base) '
++ CONDA_PROMPT_MODIFIER='(base) '
++ export CONDA_PREFIX_2=/Users/emily/miniconda3/envs/main
++ CONDA_PREFIX_2=/Users/emily/miniconda3/envs/main
++ export CONDA_EXE=/Users/emily/miniforge3/bin/conda
++ CONDA_EXE=/Users/emily/miniforge3/bin/conda
++ export _CE_M=
++ _CE_M=
++ export _CE_CONDA=
++ _CE_CONDA=
++ export CONDA_PYTHON_EXE=/Users/emily/miniforge3/bin/python
++ CONDA_PYTHON_EXE=/Users/emily/miniforge3/bin/python
++ . /Users/emily/miniforge3/etc/conda/activate.d/libglib_activate.sh
+++ export GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
+++ GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
+++ export GSETTINGS_SCHEMA_DIR=/Users/emily/miniforge3/share/glib-2.0/schemas
+++ GSETTINGS_SCHEMA_DIR=/Users/emily/miniforge3/share/glib-2.0/schemas
++ . /Users/emily/miniforge3/etc/conda/activate.d/libxml2_activate.sh
+++ test -n ''
+++ xml_catalog_files_libxml2=
+++ XML_CATALOG_FILES=
+++ conda_catalog_files=
+++ ifs_libxml2=' 	
'
+++ IFS=' '
+++ rem=/Users/emily/miniforge3
+++ for pre in '${rem}'
+++ test '' = /Users/emily/miniforge3
+++ conda_catalog_files=/Users/emily/miniforge3
+++ rem=
+++ IFS=' 	
'
+++ conda_catalog_files='file:///Users/emily/miniforge3/etc/xml/catalog file:///etc/xml/catalog'
+++ export 'XML_CATALOG_FILES=file:///Users/emily/miniforge3/etc/xml/catalog file:///etc/xml/catalog'
+++ XML_CATALOG_FILES='file:///Users/emily/miniforge3/etc/xml/catalog file:///etc/xml/catalog'
+++ unset conda_catalog_files ifs_libxml2 rem
+ bash scripts/build.sh
+ env
+ sort
CONDA_DEFAULT_ENV=base
CONDA_EXE=/Users/emily/miniforge3/bin/conda
CONDA_PREFIX=/Users/emily/miniforge3
CONDA_PREFIX_1=/Users/emily/miniforge3
CONDA_PREFIX_2=/Users/emily/miniconda3/envs/main
CONDA_PROMPT_MODIFIER=(base) 
CONDA_PYTHON_EXE=/Users/emily/miniforge3/bin/python
CONDA_SHLVL=3
GSETTINGS_SCHEMA_DIR=/Users/emily/miniforge3/share/glib-2.0/schemas
GSETTINGS_SCHEMA_DIR_CONDA_BACKUP=
HOME=/Users/emily
LC_CTYPE=UTF-8
LOGNAME=emily
PATH=/Users/emily/miniforge3/bin:/usr/local/opt/node@20/bin:/usr/local/opt/node@18/bin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/grep/libexec/gnubin:/usr/local/opt/openjdk@8/bin:/Users/emily/.rbenv/shims:/Applications/Sublime Text (4126).app/Contents/SharedSupport/bin:/opt/homebrew/bin:/Users/emily/miniforge3/condabin:/Users/emily/.yarn/bin:/Users/emily/.config/yarn/global/node_modules/.bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
PWD=/Users/emily/miniforge
RBENV_SHELL=bash
SHELL=/bin/bash
SHLVL=3
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.nsfkKeA9v8/Listeners
TARGET_PLATFORM=osx-64
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=447
TERM_SESSION_ID=F37B0BB4-87AF-4306-80F2-3D131DA84088
TMPDIR=/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/
USER=emily
XML_CATALOG_FILES=file:///Users/emily/miniforge3/etc/xml/catalog file:///etc/xml/catalog
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=/Users/emily/miniforge3/bin/env
_CE_CONDA=
_CE_M=
__CFBundleIdentifier=com.apple.Terminal
+ echo '***** Start: Building Miniforge installer *****'
***** Start: Building Miniforge installer *****
+ CONSTRUCT_ROOT=/Users/emily/miniforge
+ cd /Users/emily/miniforge
+ echo '***** Install constructor *****'
***** Install constructor *****
+ mamba install --yes --channel conda-forge --override-channels jinja2 curl libarchive 'constructor>=3.9.3'

Looking for: ['jinja2', 'curl', 'libarchive', "constructor[version='>=3.9.3']"]

conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache

Pinned packages:
  - python 3.10.*


Transaction

  Prefix: /Users/emily/miniforge3

  All requested packages already installed

++ uname
+ [[ Darwin == \D\a\r\w\i\n ]]
+ mamba install --yes --channel conda-forge --override-channels coreutils

Looking for: ['coreutils']

conda-forge/osx-64                                          Using cache
conda-forge/noarch                                          Using cache

Pinned packages:
  - python 3.10.*


Transaction

  Prefix: /Users/emily/miniforge3

  All requested packages already installed

+ mamba list
# packages in environment at /Users/emily/miniforge3:
#
# Name                    Version                   Build  Channel
aom                       3.9.1                hf036a51_0    conda-forge
archspec                  0.2.3              pyhd8ed1ab_0    conda-forge
boltons                   24.0.0             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0           py310h9e9d8ca_1    conda-forge
bzip2                     1.0.8                h10d778d_5    conda-forge
c-ares                    1.34.2               h32b1619_0    conda-forge
ca-certificates           2024.8.30            h8857fd0_0    conda-forge
cairo                     1.18.0               h9f650ed_2    conda-forge
certifi                   2024.8.30          pyhd8ed1ab_0    conda-forge
cffi                      1.16.0          py310hdca579f_0    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.3.0          py310h2ec42d9_0    conda-forge
conda-libmamba-solver     24.1.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
conda-standalone          24.7.1               h3c21f50_0    conda-forge
constructor               3.9.3              pyhc725047_0    conda-forge
coreutils                 9.5                  h10d778d_0    conda-forge
curl                      8.11.0               hd8fc636_0    conda-forge
dav1d                     1.2.1                h0dc2134_0    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
expat                     2.6.2                h73e2aa4_0    conda-forge
ffmpeg                    7.0.2           gpl_h5256a10_102    conda-forge
fmt                       10.2.1               h7728843_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 h77eed37_2    conda-forge
fontconfig                2.14.2               h5bb23bf_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
freetype                  2.12.1               h60636b9_2    conda-forge
fribidi                   1.0.10               hbcb3906_0    conda-forge
gettext                   0.22.5               hdfe23c8_3    conda-forge
gettext-tools             0.22.5               hdfe23c8_3    conda-forge
gmp                       6.3.0                hf036a51_2    conda-forge
gnutls                    3.8.7                hfad6214_0    conda-forge
graphite2                 1.3.13            h73e2aa4_1003    conda-forge
harfbuzz                  9.0.0                h053f038_0    conda-forge
icu                       73.2                 hf5e326d_0    conda-forge
idna                      3.6                pyhd8ed1ab_0    conda-forge
jinja2                    3.1.4              pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4             py310h2ec42d9_3    conda-forge
krb5                      1.21.3               h37d8d59_0    conda-forge
lame                      3.100             hb7f2c08_1003    conda-forge
lcms2                     2.16                 ha2f27b4_0    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libabseil                 20240116.2      cxx17_hf036a51_1    conda-forge
libarchive                3.7.4                h20e244c_0    conda-forge
libasprintf               0.22.5               hdfe23c8_3    conda-forge
libasprintf-devel         0.22.5               hdfe23c8_3    conda-forge
libass                    0.17.3               h5386a9e_0    conda-forge
libcurl                   8.11.0               hd8fc636_0    conda-forge
libcxx                    18.1.8               heced48a_4    conda-forge
libdeflate                1.22                 h00291cd_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 h10d778d_2    conda-forge
libexpat                  2.6.2                h73e2aa4_0    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgettextpo              0.22.5               hdfe23c8_3    conda-forge
libgettextpo-devel        0.22.5               hdfe23c8_3    conda-forge
libglib                   2.80.3               h736d271_2    conda-forge
libhwloc                  2.11.1          default_h456cccd_1000    conda-forge
libiconv                  1.17                 hd75f5a5_2    conda-forge
libidn2                   2.3.7                h10d778d_0    conda-forge
libintl                   0.22.5               hdfe23c8_3    conda-forge
libintl-devel             0.22.5               hdfe23c8_3    conda-forge
libjpeg-turbo             3.0.0                h0dc2134_1    conda-forge
libmamba                  1.5.8                ha449628_0    conda-forge
libmambapy                1.5.8           py310hd168405_0    conda-forge
libnghttp2                1.64.0               hc7306c3_0    conda-forge
libopenvino               2024.3.0             h3d2f4b3_0    conda-forge
libopenvino-auto-batch-plugin 2024.3.0             h7b87a6e_0    conda-forge
libopenvino-auto-plugin   2024.3.0             h7b87a6e_0    conda-forge
libopenvino-hetero-plugin 2024.3.0             h280e65d_0    conda-forge
libopenvino-intel-cpu-plugin 2024.3.0             h3d2f4b3_0    conda-forge
libopenvino-ir-frontend   2024.3.0             h280e65d_0    conda-forge
libopenvino-onnx-frontend 2024.3.0             he1e86a1_0    conda-forge
libopenvino-paddle-frontend 2024.3.0             he1e86a1_0    conda-forge
libopenvino-pytorch-frontend 2024.3.0             hf036a51_0    conda-forge
libopenvino-tensorflow-frontend 2024.3.0             haca2b7f_0    conda-forge
libopenvino-tensorflow-lite-frontend 2024.3.0             hf036a51_0    conda-forge
libopus                   1.3.1                hc929b4f_1    conda-forge
libpng                    1.6.43               h92b6c6a_0    conda-forge
libprotobuf               4.25.3               h4e4d658_0    conda-forge
libsolv                   0.7.30               h69d5d9b_0    conda-forge
libsqlite                 3.46.0               h1b8f9f3_0    conda-forge
libssh2                   1.11.0               hd019ec5_0    conda-forge
libtasn1                  4.19.0               hb7f2c08_0    conda-forge
libtiff                   4.7.0                h583c2ba_1    conda-forge
libunistring              0.9.10               h0d85af4_0    conda-forge
libvpx                    1.14.1               hf036a51_0    conda-forge
libwebp-base              1.4.0                h10d778d_0    conda-forge
libxcb                    1.17.0               hf1f96e2_0    conda-forge
libxml2                   2.12.7               hc603aa4_3    conda-forge
libzlib                   1.3.1                h87427d6_1    conda-forge
lz4-c                     1.9.4                hf0c8a7f_0    conda-forge
lzo                       2.10              haf1e3a3_1000    conda-forge
mamba                     1.5.8           py310h6bde348_0    conda-forge
markupsafe                3.0.2           py310h72eadd2_0    conda-forge
menuinst                  2.0.2           py310h2ec42d9_0    conda-forge
ncurses                   6.4.20240210         h73e2aa4_0    conda-forge
nettle                    3.9.1                h8e11ae5_0    conda-forge
openh264                  2.4.1                h73e2aa4_0    conda-forge
openjpeg                  2.5.2                h7310d3a_0    conda-forge
openssl                   3.3.2                hd23fc13_0    conda-forge
p11-kit                   0.24.1               h65f8906_0    conda-forge
packaging                 24.0               pyhd8ed1ab_0    conda-forge
pcre2                     10.44                h7634a1b_2    conda-forge
pillow                    11.0.0          py310h32d1d24_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pixman                    0.43.4               h73e2aa4_0    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.4.0              pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h00291cd_1002    conda-forge
pugixml                   1.14                 he965462_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6           py310h6729b98_0    conda-forge
pycparser                 2.22               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.14         h00d2728_0_cpython    conda-forge
python_abi                3.10                    4_cp310    conda-forge
readline                  8.2                  h9e318b2_1    conda-forge
reproc                    14.2.4.post0         h10d778d_1    conda-forge
reproc-cpp                14.2.4.post0         h93d8f39_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ruamel.yaml               0.18.6          py310hb372a2b_0    conda-forge
ruamel.yaml.clib          0.2.8           py310hb372a2b_0    conda-forge
setuptools                69.5.1             pyhd8ed1ab_0    conda-forge
snappy                    1.2.1                he1e6707_0    conda-forge
svt-av1                   2.2.1                hac325c4_0    conda-forge
tbb                       2021.12.0            h3c5361c_3    conda-forge
tk                        8.6.13               h1abcd95_1    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
truststore                0.8.0              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
wheel                     0.43.0             pyhd8ed1ab_1    conda-forge
x264                      1!164.3095           h775f41a_2    conda-forge
x265                      3.5                  hbb4e6a2_3    conda-forge
xorg-libxau               1.0.11               h00291cd_1    conda-forge
xorg-libxdmcp             1.1.5                h00291cd_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
yaml-cpp                  0.8.0                he965462_0    conda-forge
zlib                      1.3.1                h87427d6_1    conda-forge
zstandard                 0.23.0          py310h0e17136_0    conda-forge
zstd                      1.5.6                h915ae27_0    conda-forge
+ echo '***** Make temp directory *****'
***** Make temp directory *****
++ uname
+ [[ Darwin == MINGW* ]]
++ mktemp -d
+ TEMP_DIR=/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG
+ echo '***** Copy file for installer construction *****'
***** Copy file for installer construction *****
+ cp -R Miniforge3 /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/
+ cp LICENSE /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/
+ ls -al /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG
total 4
drwx------    4 emily staff   128 Nov  6 14:20 .
drwx------ 1187 emily staff 37984 Nov  6 14:20 ..
-rw-r--r--    1 emily staff  2474 Nov  6 14:20 LICENSE
drwxr-xr-x    7 emily staff   224 Nov  6 14:20 Miniforge3
+ [[ osx-64 != win-* ]]
+ MICROMAMBA_VERSION=1.5.9
+ MICROMAMBA_BUILD=0
+ mkdir /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba
+ pushd /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba
/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba ~/miniforge
+ curl -L -O https://anaconda.org/conda-forge/micromamba/1.5.9/download/osx-64/micromamba-1.5.9-0.tar.bz2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4031    0  4031    0     0  11364      0 --:--:-- --:--:-- --:--:-- 11387
100 5600k  100 5600k    0     0  4022k      0  0:00:01  0:00:01 --:--:-- 8903k
+ bsdtar -xf micromamba-1.5.9-0.tar.bz2
+ [[ osx-64 == win-* ]]
+ MICROMAMBA_FILE=/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba/bin/micromamba
+ popd
~/miniforge
+ EXTRA_CONSTRUCTOR_ARGS=' --conda-exe /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba/bin/micromamba --platform osx-64'
+ echo '***** Set virtual package versions *****'
***** Set virtual package versions *****
+ [[ osx-64 == linux-* ]]
+ [[ osx-64 == osx-64 ]]
+ export CONDA_OVERRIDE_OSX=10.13
+ CONDA_OVERRIDE_OSX=10.13
+ echo '***** Construct the installer *****'
***** Construct the installer *****
+ cd /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG
+ constructor /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/Miniforge3/ --output-dir /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG --conda-exe /var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba/bin/micromamba --platform osx-64
CondaSolver(name='libmamba', backend=<class 'conda_libmamba_solver.solver.LibMambaSolver'>)
INFO:constructor.main:Got the following cli arguments: 'Namespace(debug=False, output_dir='/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG', cache_dir='~/.conda/constructor', clean=False, platform='osx-64', dry_run=False, verbose=False, conda_exe='/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba/bin/micromamba', config_filename='construct.yaml', dir_path='/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/Miniforge3/')'
INFO:constructor.main:platform: osx-64
WARNING:constructor.main:conda-standalone 23.11.0 or above is required for shortcuts on Unix.
libmamba solver
INFO:conda.conda_libmamba_solver.solver:conda version: 24.3.0
INFO:conda.conda_libmamba_solver.solver:conda-libmamba-solver version: 24.1.0
INFO:conda.conda_libmamba_solver.solver:libmambapy version: 1.5.8
INFO:conda.conda_libmamba_solver.solver:Target prefix: '/constructor/no-environment'
INFO:conda.conda_libmamba_solver.solver:Command: ['/Users/emily/miniforge3/bin/constructor', '/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/Miniforge3/', '--output-dir', '/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG', '--conda-exe', '/var/folders/zh/dy02ljyd4mj5_nfm158hwcr00000gn/T/tmp.N5Y68GD5XG/micromamba/bin/micromamba', '--platform', 'osx-64']
CondaSolver(name='libmamba', backend=<class 'conda_libmamba_solver.solver.LibMambaSolver'>)
Channels:
 - conda-forge
Platform: osx-64
Collecting package metadata (repodata.json): done
Solving environment: | INFO:conda.conda_libmamba_solver.solver:Solver attempt: #1
INFO:conda.conda_libmamba_solver.solver:Solver tasks:
{
  "INSTALL": [
    "python=3.12",
    "mamba==1.5.9",
    "pip"
  ]
}
done


==> WARNING: A newer version of conda exists. <==
    current version: 24.3.0
    latest version: 24.9.2

Please update conda by running

    $ conda update -n base -c conda-forge conda


Traceback (most recent call last):
  File "/Users/emily/miniforge3/bin/constructor", line 10, in <module>
    sys.exit(main())
  File "/Users/emily/miniforge3/lib/python3.10/site-packages/constructor/main.py", line 452, in main
    main_build(dir_path, output_dir=out_dir, platform=args.platform,
  File "/Users/emily/miniforge3/lib/python3.10/site-packages/constructor/main.py", line 225, in main_build
    fcp_main(info, verbose=verbose, dry_run=dry_run, conda_exe=conda_exe)
  File "/Users/emily/miniforge3/lib/python3.10/site-packages/constructor/fcp.py", line 500, in main
    ) = _main(
  File "/Users/emily/miniforge3/lib/python3.10/site-packages/constructor/fcp.py", line 395, in _main
    raise RuntimeError(
RuntimeError: 'check_path_spaces=False' cannot be used on Linux and macOS installers if 'conda' is present in the 'base' environment.

I tried to resolve this by removing conda from the base environment by removing conda from specs and user_requested_specs in construct.yaml. However, conda is still installed (as a dependency of mamba ?) and the error persists.

@jaimergp
Copy link
Member

jaimergp commented Nov 7, 2024

Yea it's a bit tricky, now that I recall: conda/constructor#449 (comment)

You can patch this block out and assume the risk, though.

@emlys
Copy link

emlys commented Nov 7, 2024

Thanks. If I only want to use mamba, is that likely to work? Or, is there a way to exclude conda from the base environment and only use mamba?

@jaimergp
Copy link
Member

jaimergp commented Nov 8, 2024

I think mamba 2.x does not suffer from this problem, so go for it. This construct.yaml should work:

{% set name = os.environ.get("MINIFORGE_NAME", "Miniforge3") %}
{% set version = os.environ.get("MINIFORGE_VERSION", "24.9.0-0") %}
# when mamba_version is updated here, also update MICROMAMBA_VERSION in scripts/build.sh
{% set mamba_version = "2.0.2"%}

name: {{ name }}
version: {{ version }}
company: conda-forge

channels:
  # specifying the channel with the full URL adds two channels
  # when the end user adds the channel without the full URL
  # - https://conda.anaconda.org/conda-forge
  - conda-forge

write_condarc: True
# keep pkgs for space-saving implications for hardlinks when create new environments
# and keep the same with Miniconda
keep_pkgs: True

# During the interactive installation, these variables are checked.
# During batch installation, conda is never initialized
initialize_conda: False
initialize_by_default: False

user_requested_specs:
  - python 3.12.*
  - mamba >={{ mamba_version }}
  - pip

specs:
  - python 3.12.*
  - mamba {{ mamba_version }}
  - pip

virtual_specs:
  - __glibc >=2.17 # [linux]
  - __osx >=10.13 # [osx]

But at that point, why not use micromamba directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested windows
Development

No branches or pull requests

4 participants