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

Conda pack does not work with Python 3.10 or 3.11 #244

Closed
2 tasks done
luismarquezgft opened this issue Nov 25, 2022 · 13 comments
Closed
2 tasks done

Conda pack does not work with Python 3.10 or 3.11 #244

luismarquezgft opened this issue Nov 25, 2022 · 13 comments
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@luismarquezgft
Copy link

luismarquezgft commented Nov 25, 2022

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

This is a recurring issue. There's a problem with the parsing of the Python version, and conda pack maps Python 3.10 or 3.11 to Python 3.1.

Steps to reproduce

$ conda create --name python310 python=3.10
$ conda activate python310
(python310) $ conda list
# packages in environment at /***/python310:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2022.9.24            ha878542_0    conda-forge
ld_impl_linux-64          2.39                 hcc3a1bd_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
openssl                   3.0.7                h166bdaf_0    conda-forge
pip                       22.3.1             pyhd8ed1ab_0    conda-forge
python                    3.10.8          h4a9ceb5_0_cpython    conda-forge
readline                  8.1.2                h0f457ee_0    conda-forge
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tzdata                    2022f                h191b570_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

$ conda pack -n python310
Collecting packages...
CondaPackError: 
Files managed by conda were found to have been deleted/overwritten in the
following packages:

- setuptools 65.5.1:
    lib/python3.1/site-packages/_distutils_hack/__init__.py
    lib/python3.1/site-packages/_distutils_hack/override.py
    lib/python3.1/site-packages/distutils-precedence.pth
    + 238 others
- pip 22.3.1:
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/PKG-INFO
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/SOURCES.txt
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/dependency_links.txt
    + 498 others
- wheel 0.38.4:
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/PKG-INFO
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/SOURCES.txt
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/dependency_links.txt
    + 21 others

This is usually due to `pip` uninstalling or clobbering conda managed files,
resulting in an inconsistent environment. Please check your environment for
conda/pip conflicts using `conda list`, and fix the environment by ensuring
only one version of each package is installed (conda preferred).

Conda Info

active environment : None
            shell level : 0
       user config file : /home/azureuser/.condarc
 populated config files : /home/azureuser/.condarc
          conda version : 22.9.0
    conda-build version : 3.21.8
         python version : 3.9.12.final.0
       virtual packages : __linux=5.15.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/azureuser/anaconda3  (writable)
      conda av data dir : /home/azureuser/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/azureuser/anaconda3/pkgs
                          /home/azureuser/.conda/pkgs
       envs directories : /home/azureuser/anaconda3/envs
                          /home/azureuser/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.27.1 CPython/3.9.12 Linux/5.15.0-1023-azure ubuntu/20.04.5 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

Conda Config

==> /home/azureuser/.condarc <==
channels:
  - conda-forge
  - defaults

Conda list

# packages in environment at /home/azureuser/anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0            py39h06a4308_1    defaults
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             4.5                       1_gnu    defaults
aiohttp                   3.8.1            py39h7f8727e_1    defaults
aiosignal                 1.2.0              pyhd3eb1b0_0    defaults
alabaster                 0.7.12             pyhd3eb1b0_0    defaults
anaconda                  2022.05                  py39_0    defaults
anaconda-client           1.9.0            py39h06a4308_0    defaults
anaconda-navigator        2.1.4            py39h06a4308_0    defaults
anaconda-project          0.10.2             pyhd3eb1b0_0    defaults
anyio                     3.5.0            py39h06a4308_0    defaults
appdirs                   1.4.4              pyhd3eb1b0_0    defaults
argon2-cffi               21.3.0             pyhd3eb1b0_0    defaults
argon2-cffi-bindings      21.2.0           py39h7f8727e_0    defaults
arrow                     1.2.2              pyhd3eb1b0_0    defaults
astroid                   2.6.6            py39h06a4308_0    defaults
astropy                   5.0.4            py39hce1f21e_0    defaults
asttokens                 2.0.5              pyhd3eb1b0_0    defaults
async-timeout             4.0.1              pyhd3eb1b0_0    defaults
atomicwrites              1.4.0                      py_0    defaults
attrs                     21.4.0             pyhd3eb1b0_0    defaults
automat                   20.2.0                     py_0    defaults
autopep8                  1.6.0              pyhd3eb1b0_0    defaults
babel                     2.9.1              pyhd3eb1b0_0    defaults
backcall                  0.2.0              pyhd3eb1b0_0    defaults
backports                 1.1                pyhd3eb1b0_0    defaults
backports.functools_lru_cache 1.6.4              pyhd3eb1b0_0    defaults
backports.tempfile        1.0                pyhd3eb1b0_1    defaults
backports.weakref         1.0.post1                  py_1    defaults
bcrypt                    3.2.0            py39he8ac12f_0    defaults
beautifulsoup4            4.11.1           py39h06a4308_0    defaults
binaryornot               0.4.4              pyhd3eb1b0_1    defaults
bitarray                  2.4.1            py39h7f8727e_0    defaults
bkcharts                  0.2              py39h06a4308_0    defaults
black                     19.10b0                    py_0    defaults
blas                      1.0                         mkl    defaults
bleach                    4.1.0              pyhd3eb1b0_0    defaults
blosc                     1.21.0               h8c45485_0    defaults
bokeh                     2.4.2            py39h06a4308_0    defaults
boto3                     1.21.32            pyhd3eb1b0_0    defaults
botocore                  1.24.32            pyhd3eb1b0_0    defaults
bottleneck                1.3.4            py39hce1f21e_0    defaults
brotli                    1.0.9                he6710b0_2    defaults
brotlipy                  0.7.0           py39h27cfd23_1003    defaults
brunsli                   0.1                  h2531618_0    defaults
bzip2                     1.0.8                h7b6447c_0    defaults
c-ares                    1.18.1               h7f8727e_0    defaults
ca-certificates           2022.3.29            h06a4308_1    defaults
cachetools                4.2.2              pyhd3eb1b0_0    defaults
certifi                   2021.10.8        py39h06a4308_2    defaults
cffi                      1.15.0           py39hd667e15_1    defaults
cfitsio                   3.470                hf0d0db6_6    defaults
chardet                   4.0.0           py39h06a4308_1003    defaults
charls                    2.2.0                h2531618_0    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
click                     8.0.4            py39h06a4308_0    defaults
cloudpickle               2.0.0              pyhd3eb1b0_0    defaults
clyent                    1.2.2            py39h06a4308_1    defaults
colorama                  0.4.4              pyhd3eb1b0_0    defaults
colorcet                  2.0.6              pyhd3eb1b0_0    defaults
conda                     22.9.0           py39h06a4308_0    defaults
conda-build               3.21.8           py39h06a4308_2    defaults
conda-content-trust       0.1.1              pyhd3eb1b0_0    defaults
conda-env                 2.6.0                         1    defaults
conda-pack                0.6.0              pyhd3eb1b0_0    defaults
conda-package-handling    1.8.1            py39h7f8727e_0    defaults
conda-repo-cli            1.0.4              pyhd3eb1b0_0    defaults
conda-token               0.3.0              pyhd3eb1b0_0    defaults
conda-verify              3.4.2                      py_1    defaults
constantly                15.1.0             pyh2b92418_0    defaults
cookiecutter              1.7.3              pyhd3eb1b0_0    defaults
cryptography              3.4.8            py39hd23ed53_0    defaults
cssselect                 1.1.0              pyhd3eb1b0_0    defaults
curl                      7.82.0               h7f8727e_0    defaults
cycler                    0.11.0             pyhd3eb1b0_0    defaults
cython                    0.29.28          py39h295c915_0    defaults
cytoolz                   0.11.0           py39h27cfd23_0    defaults
daal4py                   2021.5.0         py39h78b71dc_0    defaults
dal                       2021.5.1           h06a4308_803    defaults
dask                      2022.2.1           pyhd3eb1b0_0    defaults
dask-core                 2022.2.1           pyhd3eb1b0_0    defaults
dataclasses               0.8                pyh6d0b6a4_7    defaults
datashader                0.13.0             pyhd3eb1b0_1    defaults
datashape                 0.5.4            py39h06a4308_1    defaults
dbus                      1.13.18              hb2f20db_0    defaults
debugpy                   1.5.1            py39h295c915_0    defaults
decorator                 5.1.1              pyhd3eb1b0_0    defaults
defusedxml                0.7.1              pyhd3eb1b0_0    defaults
diff-match-patch          20200713           pyhd3eb1b0_0    defaults
distributed               2022.2.1           pyhd3eb1b0_0    defaults
docutils                  0.17.1           py39h06a4308_1    defaults
entrypoints               0.4              py39h06a4308_0    defaults
et_xmlfile                1.1.0            py39h06a4308_0    defaults
executing                 0.8.3              pyhd3eb1b0_0    defaults
expat                     2.4.4                h295c915_0    defaults
filelock                  3.6.0              pyhd3eb1b0_0    defaults
flake8                    3.9.2              pyhd3eb1b0_0    defaults
flask                     1.1.2              pyhd3eb1b0_0    defaults
fontconfig                2.13.1               h6c09931_0    defaults
fonttools                 4.25.0             pyhd3eb1b0_0    defaults
freetype                  2.11.0               h70c0345_0    defaults
frozenlist                1.2.0            py39h7f8727e_0    defaults
fsspec                    2022.2.0           pyhd3eb1b0_0    defaults
future                    0.18.2           py39h06a4308_1    defaults
gensim                    4.1.2            py39h295c915_0    defaults
giflib                    5.2.1                h7b6447c_0    defaults
glib                      2.69.1               h4ff587b_1    defaults
glob2                     0.7                pyhd3eb1b0_0    defaults
gmp                       6.2.1                h2531618_2    defaults
gmpy2                     2.1.2            py39heeb90bb_0    defaults
google-api-core           1.25.1             pyhd3eb1b0_0    defaults
google-auth               1.33.0             pyhd3eb1b0_0    defaults
google-cloud-core         1.7.1              pyhd3eb1b0_0    defaults
google-cloud-storage      1.31.0                     py_0    defaults
google-crc32c             1.1.2            py39h27cfd23_0    defaults
google-resumable-media    1.3.1              pyhd3eb1b0_1    defaults
googleapis-common-protos  1.53.0           py39h06a4308_0    defaults
greenlet                  1.1.1            py39h295c915_0    defaults
grpcio                    1.42.0           py39hce63b2e_0    defaults
gst-plugins-base          1.14.0               h8213a91_2    defaults
gstreamer                 1.14.0               h28cd5cc_2    defaults
h5py                      3.6.0            py39ha0f2276_0    defaults
hdf5                      1.10.6               hb1b8bf9_0    defaults
heapdict                  1.0.1              pyhd3eb1b0_0    defaults
holoviews                 1.14.8             pyhd3eb1b0_0    defaults
hvplot                    0.7.3              pyhd3eb1b0_1    defaults
hyperlink                 21.0.0             pyhd3eb1b0_0    defaults
icu                       58.2                 he6710b0_3    defaults
idna                      3.3                pyhd3eb1b0_0    defaults
imagecodecs               2021.8.26        py39h4cda21f_0    defaults
imageio                   2.9.0              pyhd3eb1b0_0    defaults
imagesize                 1.3.0              pyhd3eb1b0_0    defaults
importlib-metadata        4.11.3           py39h06a4308_0    defaults
importlib_metadata        4.11.3               hd3eb1b0_0    defaults
incremental               21.3.0             pyhd3eb1b0_0    defaults
inflection                0.5.1            py39h06a4308_0    defaults
iniconfig                 1.1.1              pyhd3eb1b0_0    defaults
intake                    0.6.5              pyhd3eb1b0_0    defaults
intel-openmp              2021.4.0          h06a4308_3561    defaults
intervaltree              3.1.0              pyhd3eb1b0_0    defaults
ipykernel                 6.9.1            py39h06a4308_0    defaults
ipython                   8.2.0            py39h06a4308_0    defaults
ipython_genutils          0.2.0              pyhd3eb1b0_1    defaults
ipywidgets                7.6.5              pyhd3eb1b0_1    defaults
isort                     5.9.3              pyhd3eb1b0_0    defaults
itemadapter               0.3.0              pyhd3eb1b0_0    defaults
itemloaders               1.0.4              pyhd3eb1b0_1    defaults
itsdangerous              2.0.1              pyhd3eb1b0_0    defaults
jdcal                     1.4.1              pyhd3eb1b0_0    defaults
jedi                      0.18.1           py39h06a4308_1    defaults
jeepney                   0.7.1              pyhd3eb1b0_0    defaults
jinja2                    2.11.3             pyhd3eb1b0_0    defaults
jinja2-time               0.2.0              pyhd3eb1b0_3    defaults
jmespath                  0.10.0             pyhd3eb1b0_0    defaults
joblib                    1.1.0              pyhd3eb1b0_0    defaults
jpeg                      9e                   h7f8727e_0    defaults
jq                        1.6               h27cfd23_1000    defaults
json5                     0.9.6              pyhd3eb1b0_0    defaults
jsonschema                4.4.0            py39h06a4308_0    defaults
jupyter                   1.0.0            py39h06a4308_7    defaults
jupyter_client            6.1.12             pyhd3eb1b0_0    defaults
jupyter_console           6.4.0              pyhd3eb1b0_0    defaults
jupyter_core              4.9.2            py39h06a4308_0    defaults
jupyter_server            1.13.5             pyhd3eb1b0_0    defaults
jupyterlab                3.3.2              pyhd3eb1b0_0    defaults
jupyterlab_pygments       0.1.2                      py_0    defaults
jupyterlab_server         2.10.3             pyhd3eb1b0_1    defaults
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1    defaults
jxrlib                    1.1                  h7b6447c_2    defaults
keyring                   23.4.0           py39h06a4308_0    defaults
kiwisolver                1.3.2            py39h295c915_0    defaults
krb5                      1.19.2               hac12032_0    defaults
lazy-object-proxy         1.6.0            py39h27cfd23_0    defaults
lcms2                     2.12                 h3be6417_0    defaults
ld_impl_linux-64          2.35.1               h7274673_9    defaults
lerc                      3.0                  h295c915_0    defaults
libaec                    1.0.4                he6710b0_1    defaults
libarchive                3.4.2                h62408e4_0    defaults
libcrc32c                 1.1.1                he6710b0_2    defaults
libcurl                   7.82.0               h0b77cf5_0    defaults
libdeflate                1.8                  h7f8727e_5    defaults
libedit                   3.1.20210910         h7f8727e_0    defaults
libev                     4.33                 h7f8727e_1    defaults
libffi                    3.3                  he6710b0_2    defaults
libgcc-ng                 9.3.0               h5101ec6_17    defaults
libgfortran-ng            7.5.0               ha8ba4b0_17    defaults
libgfortran4              7.5.0               ha8ba4b0_17    defaults
libgomp                   9.3.0               h5101ec6_17    defaults
libidn2                   2.3.2                h7f8727e_0    defaults
liblief                   0.11.5               h295c915_1    defaults
libllvm11                 11.1.0               h3826bc1_1    defaults
libnghttp2                1.46.0               hce63b2e_0    defaults
libpng                    1.6.37               hbc83047_0    defaults
libprotobuf               3.19.1               h4ff587b_0    defaults
libsodium                 1.0.18               h7b6447c_0    defaults
libspatialindex           1.9.3                h2531618_0    defaults
libssh2                   1.10.0               h8f2d780_0    defaults
libstdcxx-ng              9.3.0               hd4cf53a_17    defaults
libtiff                   4.2.0                h85742a9_0    defaults
libunistring              0.9.10               h27cfd23_0    defaults
libuuid                   1.0.3                h7f8727e_2    defaults
libwebp                   1.2.2                h55f646e_0    defaults
libwebp-base              1.2.2                h7f8727e_0    defaults
libxcb                    1.14                 h7b6447c_0    defaults
libxml2                   2.9.12               h03d6c58_0    defaults
libxslt                   1.1.34               hc22bd24_0    defaults
libzopfli                 1.0.3                he6710b0_0    defaults
llvmlite                  0.38.0           py39h4ff587b_0    defaults
locket                    0.2.1            py39h06a4308_2    defaults
lxml                      4.8.0            py39h1f438cf_0    defaults
lz4-c                     1.9.3                h295c915_1    defaults
lzo                       2.10                 h7b6447c_2    defaults
markdown                  3.3.4            py39h06a4308_0    defaults
markupsafe                2.0.1            py39h27cfd23_0    defaults
matplotlib                3.5.1            py39h06a4308_1    defaults
matplotlib-base           3.5.1            py39ha18d171_1    defaults
matplotlib-inline         0.1.2              pyhd3eb1b0_2    defaults
mccabe                    0.6.1            py39h06a4308_1    defaults
mistune                   0.8.4           py39h27cfd23_1000    defaults
mkl                       2021.4.0           h06a4308_640    defaults
mkl-service               2.4.0            py39h7f8727e_0    defaults
mkl_fft                   1.3.1            py39hd3c417c_0    defaults
mkl_random                1.2.2            py39h51133e4_0    defaults
mock                      4.0.3              pyhd3eb1b0_0    defaults
mpc                       1.1.0                h10f8cd9_1    defaults
mpfr                      4.0.2                hb69a4c5_1    defaults
mpi                       1.0                       mpich    defaults
mpich                     3.3.2                hc856adb_0    defaults
mpmath                    1.2.1            py39h06a4308_0    defaults
msgpack-python            1.0.2            py39hff7bd54_1    defaults
multidict                 5.2.0            py39h7f8727e_2    defaults
multipledispatch          0.6.0            py39h06a4308_0    defaults
munkres                   1.1.4                      py_0    defaults
mypy_extensions           0.4.3            py39h06a4308_1    defaults
navigator-updater         0.2.1                    py39_1    defaults
nbclassic                 0.3.5              pyhd3eb1b0_0    defaults
nbclient                  0.5.13           py39h06a4308_0    defaults
nbconvert                 6.4.4            py39h06a4308_0    defaults
nbformat                  5.3.0            py39h06a4308_0    defaults
ncurses                   6.3                  h7f8727e_2    defaults
nest-asyncio              1.5.5            py39h06a4308_0    defaults
networkx                  2.7.1              pyhd3eb1b0_0    defaults
nltk                      3.7                pyhd3eb1b0_0    defaults
nose                      1.3.7           pyhd3eb1b0_1008    defaults
notebook                  6.4.8            py39h06a4308_0    defaults
numba                     0.55.1           py39h51133e4_0    defaults
numexpr                   2.8.1            py39h6abb31d_0    defaults
numpy                     1.21.5           py39he7a7128_1    defaults
numpy-base                1.21.5           py39hf524024_1    defaults
numpydoc                  1.2                pyhd3eb1b0_0    defaults
olefile                   0.46               pyhd3eb1b0_0    defaults
oniguruma                 6.9.7.1              h27cfd23_0    defaults
openjpeg                  2.4.0                h3ad879b_0    defaults
openpyxl                  3.0.9              pyhd3eb1b0_0    defaults
openssl                   1.1.1n               h7f8727e_0    defaults
packaging                 21.3               pyhd3eb1b0_0    defaults
pandas                    1.4.2            py39h295c915_0    defaults
pandocfilters             1.5.0              pyhd3eb1b0_0    defaults
panel                     0.13.0           py39h06a4308_0    defaults
param                     1.12.0             pyhd3eb1b0_0    defaults
parsel                    1.6.0            py39h06a4308_0    defaults
parso                     0.8.3              pyhd3eb1b0_0    defaults
partd                     1.2.0              pyhd3eb1b0_1    defaults
patchelf                  0.13                 h295c915_0    defaults
pathspec                  0.7.0                      py_0    defaults
patsy                     0.5.2            py39h06a4308_1    defaults
pcre                      8.45                 h295c915_0    defaults
pep8                      1.7.1            py39h06a4308_0    defaults
pexpect                   4.8.0              pyhd3eb1b0_3    defaults
pickleshare               0.7.5           pyhd3eb1b0_1003    defaults
pillow                    9.0.1            py39h22f2fdc_0    defaults
pip                       21.2.4           py39h06a4308_0    defaults
pkginfo                   1.8.2              pyhd3eb1b0_0    defaults
plotly                    5.6.0              pyhd3eb1b0_0    defaults
pluggy                    1.0.0            py39h06a4308_1    defaults
poyo                      0.5.0              pyhd3eb1b0_0    defaults
prometheus_client         0.13.1             pyhd3eb1b0_0    defaults
prompt-toolkit            3.0.20             pyhd3eb1b0_0    defaults
prompt_toolkit            3.0.20               hd3eb1b0_0    defaults
protego                   0.1.16                     py_0    defaults
protobuf                  3.19.1           py39h295c915_0    defaults
psutil                    5.8.0            py39h27cfd23_1    defaults
ptyprocess                0.7.0              pyhd3eb1b0_2    defaults
pure_eval                 0.2.2              pyhd3eb1b0_0    defaults
py                        1.11.0             pyhd3eb1b0_0    defaults
py-lief                   0.11.5           py39h295c915_1    defaults
pyasn1                    0.4.8              pyhd3eb1b0_0    defaults
pyasn1-modules            0.2.8                      py_0    defaults
pycodestyle               2.7.0              pyhd3eb1b0_0    defaults
pycosat                   0.6.3            py39h27cfd23_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyct                      0.4.6            py39h06a4308_0    defaults
pycurl                    7.44.1           py39h8f2d780_1    defaults
pydispatcher              2.0.5            py39h06a4308_2    defaults
pydocstyle                6.1.1              pyhd3eb1b0_0    defaults
pyerfa                    2.0.0            py39h27cfd23_0    defaults
pyflakes                  2.3.1              pyhd3eb1b0_0    defaults
pygments                  2.11.2             pyhd3eb1b0_0    defaults
pyhamcrest                2.0.2              pyhd3eb1b0_2    defaults
pyjwt                     2.4.0            py39h06a4308_0    defaults
pylint                    2.9.6            py39h06a4308_1    defaults
pyls-spyder               0.4.0              pyhd3eb1b0_0    defaults
pyodbc                    4.0.32           py39h295c915_1    defaults
pyopenssl                 21.0.0             pyhd3eb1b0_1    defaults
pyparsing                 3.0.4              pyhd3eb1b0_0    defaults
pyqt                      5.9.2            py39h2531618_6    defaults
pyrsistent                0.18.0           py39heee7806_0    defaults
pysocks                   1.7.1            py39h06a4308_0    defaults
pytables                  3.6.1            py39h77479fe_1    defaults
pytest                    7.1.1            py39h06a4308_0    defaults
python                    3.9.12               h12debd9_0    defaults
python-dateutil           2.8.2              pyhd3eb1b0_0    defaults
python-fastjsonschema     2.15.1             pyhd3eb1b0_0    defaults
python-libarchive-c       2.9                pyhd3eb1b0_1    defaults
python-lsp-black          1.0.0              pyhd3eb1b0_0    defaults
python-lsp-jsonrpc        1.0.0              pyhd3eb1b0_0    defaults
python-lsp-server         1.2.4              pyhd3eb1b0_0    defaults
python-slugify            5.0.2              pyhd3eb1b0_0    defaults
python-snappy             0.6.0            py39h2531618_3    defaults
pytz                      2021.3             pyhd3eb1b0_0    defaults
pyviz_comms               2.0.2              pyhd3eb1b0_0    defaults
pywavelets                1.3.0            py39h7f8727e_0    defaults
pyxdg                     0.27               pyhd3eb1b0_0    defaults
pyyaml                    6.0              py39h7f8727e_1    defaults
pyzmq                     22.3.0           py39h295c915_2    defaults
qdarkstyle                3.0.2              pyhd3eb1b0_0    defaults
qstylizer                 0.1.10             pyhd3eb1b0_0    defaults
qt                        5.9.7                h5867ecd_1    defaults
qtawesome                 1.0.3              pyhd3eb1b0_0    defaults
qtconsole                 5.3.0              pyhd3eb1b0_0    defaults
qtpy                      2.0.1              pyhd3eb1b0_0    defaults
queuelib                  1.5.0            py39h06a4308_0    defaults
readline                  8.1.2                h7f8727e_1    defaults
regex                     2022.3.15        py39h7f8727e_0    defaults
requests                  2.27.1             pyhd3eb1b0_0    defaults
requests-file             1.5.1              pyhd3eb1b0_0    defaults
ripgrep                   12.1.1                        0    defaults
rope                      0.22.0             pyhd3eb1b0_0    defaults
rsa                       4.7.2              pyhd3eb1b0_1    defaults
rtree                     0.9.7            py39h06a4308_1    defaults
ruamel_yaml               0.15.100         py39h27cfd23_0    defaults
s3transfer                0.5.0              pyhd3eb1b0_0    defaults
scikit-image              0.19.2           py39h51133e4_0    defaults
scikit-learn              1.0.2            py39h51133e4_1    defaults
scikit-learn-intelex      2021.5.0         py39h06a4308_0    defaults
scipy                     1.7.3            py39hc147768_0    defaults
scrapy                    2.6.1            py39h06a4308_0    defaults
seaborn                   0.11.2             pyhd3eb1b0_0    defaults
secretstorage             3.3.1            py39h06a4308_0    defaults
send2trash                1.8.0              pyhd3eb1b0_1    defaults
service_identity          18.1.0             pyhd3eb1b0_1    defaults
setuptools                61.2.0           py39h06a4308_0    defaults
sip                       4.19.13          py39h295c915_0    defaults
six                       1.16.0             pyhd3eb1b0_1    defaults
smart_open                5.1.0              pyhd3eb1b0_0    defaults
snappy                    1.1.9                h295c915_0    defaults
sniffio                   1.2.0            py39h06a4308_1    defaults
snowballstemmer           2.2.0              pyhd3eb1b0_0    defaults
sortedcollections         2.1.0              pyhd3eb1b0_0    defaults
sortedcontainers          2.4.0              pyhd3eb1b0_0    defaults
soupsieve                 2.3.1              pyhd3eb1b0_0    defaults
sphinx                    4.4.0              pyhd3eb1b0_0    defaults
sphinxcontrib-applehelp   1.0.2              pyhd3eb1b0_0    defaults
sphinxcontrib-devhelp     1.0.2              pyhd3eb1b0_0    defaults
sphinxcontrib-htmlhelp    2.0.0              pyhd3eb1b0_0    defaults
sphinxcontrib-jsmath      1.0.1              pyhd3eb1b0_0    defaults
sphinxcontrib-qthelp      1.0.3              pyhd3eb1b0_0    defaults
sphinxcontrib-serializinghtml 1.1.5              pyhd3eb1b0_0    defaults
spyder                    5.1.5            py39h06a4308_1    defaults
spyder-kernels            2.1.3            py39h06a4308_0    defaults
sqlalchemy                1.4.32           py39h7f8727e_0    defaults
sqlite                    3.38.2               hc218d9a_0    defaults
stack_data                0.2.0              pyhd3eb1b0_0    defaults
statsmodels               0.13.2           py39h7f8727e_0    defaults
sympy                     1.10.1           py39h06a4308_0    defaults
tabulate                  0.8.9            py39h06a4308_0    defaults
tbb                       2021.5.0             hd09550d_0    defaults
tbb4py                    2021.5.0         py39hd09550d_0    defaults
tblib                     1.7.0              pyhd3eb1b0_0    defaults
tenacity                  8.0.1            py39h06a4308_0    defaults
terminado                 0.13.1           py39h06a4308_0    defaults
testpath                  0.5.0              pyhd3eb1b0_0    defaults
text-unidecode            1.3                pyhd3eb1b0_0    defaults
textdistance              4.2.1              pyhd3eb1b0_0    defaults
threadpoolctl             2.2.0              pyh0d69192_0    defaults
three-merge               0.1.1              pyhd3eb1b0_0    defaults
tifffile                  2021.7.2           pyhd3eb1b0_2    defaults
tinycss                   0.4             pyhd3eb1b0_1002    defaults
tk                        8.6.11               h1ccaba5_0    defaults
tldextract                3.2.0              pyhd3eb1b0_0    defaults
toml                      0.10.2             pyhd3eb1b0_0    defaults
tomli                     1.2.2              pyhd3eb1b0_0    defaults
toolz                     0.11.2             pyhd3eb1b0_0    defaults
tornado                   6.1              py39h27cfd23_0    defaults
tqdm                      4.64.0           py39h06a4308_0    defaults
traitlets                 5.1.1              pyhd3eb1b0_0    defaults
twisted                   22.2.0           py39h7f8727e_0    defaults
typed-ast                 1.4.3            py39h7f8727e_1    defaults
typing-extensions         4.1.1                hd3eb1b0_0    defaults
typing_extensions         4.1.1              pyh06a4308_0    defaults
tzdata                    2022a                hda174b7_0    defaults
ujson                     5.1.0            py39h295c915_0    defaults
unidecode                 1.2.0              pyhd3eb1b0_0    defaults
unixodbc                  2.3.9                h7b6447c_0    defaults
urllib3                   1.26.9           py39h06a4308_0    defaults
w3lib                     1.21.0             pyhd3eb1b0_0    defaults
watchdog                  2.1.6            py39h06a4308_0    defaults
wcwidth                   0.2.5              pyhd3eb1b0_0    defaults
webencodings              0.5.1            py39h06a4308_1    defaults
websocket-client          0.58.0           py39h06a4308_4    defaults
werkzeug                  2.0.3              pyhd3eb1b0_0    defaults
wget                      1.21.3               h0b77cf5_0    defaults
wheel                     0.37.1             pyhd3eb1b0_0    defaults
widgetsnbextension        3.5.2            py39h06a4308_0    defaults
wrapt                     1.12.1           py39he8ac12f_1    defaults
wurlitzer                 3.0.2            py39h06a4308_0    defaults
xarray                    0.20.1             pyhd3eb1b0_1    defaults
xlrd                      2.0.1              pyhd3eb1b0_0    defaults
xlsxwriter                3.0.3              pyhd3eb1b0_0    defaults
xz                        5.2.5                h7b6447c_0    defaults
yaml                      0.2.5                h7b6447c_0    defaults
yapf                      0.31.0             pyhd3eb1b0_0    defaults
yarl                      1.6.3            py39h27cfd23_0    defaults
zeromq                    4.3.4                h2531618_0    defaults
zfp                       0.5.5                h295c915_6    defaults
zict                      2.0.0              pyhd3eb1b0_0    defaults
zipp                      3.7.0              pyhd3eb1b0_0    defaults
zlib                      1.2.12               h7f8727e_2    defaults
zope                      1.0              py39h06a4308_1    defaults
zope.interface            5.4.0            py39h7f8727e_0    defaults
zstd                      1.4.9                haebb681_0    defaults

Additional Context

No response

@luismarquezgft luismarquezgft added the type::bug describes erroneous operation, use severity::* to classify the type label Nov 25, 2022
@luismarquezgft luismarquezgft changed the title Conda pack error does not work with Python 3.10 or 3.11 Conda pack does not work with Python 3.10 or 3.11 Nov 25, 2022
@lgorenstein
Copy link

Also observed on our HPC cluster using older versions of Anaconda
(2020.11, conda version 4.9.2, base python version 3.8.5)

@jtilly
Copy link
Contributor

jtilly commented Dec 12, 2022

I can't reproduce this issue. What happens when you run the following three lines?

conda create -y -n python310 python=3.10 conda-pack  # (you can also use mamba instead of conda here)
conda activate python310
conda-pack

This works on Linux and macos for me.

Based on the error message that you're getting, I suspect that you ran pip install <something> in your Python 3.10 environment before trying to run conda-pack.

For example, when I do

conda create -y -n python310pip python=3.10 conda-pack  # (you can also use mamba instead of conda here)
conda activate python310pip
pip install 'pip<22.3.1' 
conda-pack

I get

Collecting packages...
CondaPackError: 
Files managed by conda were found to have been deleted/overwritten in the
following packages:

- pip 22.3.1:
    lib/python3.10/site-packages/pip-22.3.1-py3.11.egg-info/PKG-INFO
    lib/python3.10/site-packages/pip-22.3.1-py3.11.egg-info/SOURCES.txt
    lib/python3.10/site-packages/pip-22.3.1-py3.11.egg-info/dependency_links.txt
    + 3 others

This is usually due to `pip` uninstalling or clobbering conda managed files,
resulting in an inconsistent environment. Please check your environment for
conda/pip conflicts using `conda list`, and fix the environment by ensuring
only one version of each package is installed (conda preferred).

which looks a lot like your error message.

You seem to be using conda-pack=0.6.0. Please use >=0.7.0, otherwise you'll run into #199.

@lgorenstein
Copy link

Hello Jan,

Thank you for looking at this! I did not run any pip installs, and I did exactly the three lines you said. Note: I do not have conda-forge in my channels, so using just the default channel I end up with conda-pack 0.6.0. which throwns an error:

$ cat ~/.condarc 
channels:
  - defaults

$ module --force purge
$ module load anaconda/2020.11-py38
$ conda create -y -n python310 python=3.10 conda-pack
[...]
conda-pack         pkgs/main/noarch::conda-pack-0.6.0-pyhd3eb1b0_0
[...]
$ conda activate python310
$ conda-pack
Collecting packages...
CondaPackError: 
Files managed by conda were found to have been deleted/overwritten in the
following packages:

- wheel 0.37.1:
    lib/python3.1/site-packages/wheel-0.37.1-py3.9.egg-info/PKG-INFO
    lib/python3.1/site-packages/wheel-0.37.1-py3.9.egg-info/SOURCES.txt
    lib/python3.1/site-packages/wheel-0.37.1-py3.9.egg-info/dependency_links.txt
    + 20 others
- conda-pack 0.6.0:
    lib/python3.1/site-packages/conda_pack-0.6.0.dist-info/INSTALLER
    lib/python3.1/site-packages/conda_pack-0.6.0.dist-info/LICENSE.txt
    lib/python3.1/site-packages/conda_pack-0.6.0.dist-info/METADATA
    + 19 others

This is usually due to `pip` uninstalling or clobbering conda managed files,
...

As you can see, the pip warning is actually a red herring (note the lib/python3.1/ instead of lib/python3.10/). So this probably looks like #199 you mentioned because default channel only has 0.6.0, not 0.7+. It would certainly be nice to have the most up-to-date conda-pack in the main conda channel, though.


But the problem is that I also see the same error with 0.7.0 from conda-forge:

$ conda create -y -n python310forge -c conda-forge python=3.10 conda-pack
[...]
  conda-pack         conda-forge/noarch::conda-pack-0.7.0-pyh6c4a22f_0
[...]

$ conda activate python310forge
$ conda-pack
Collecting packages...
CondaPackError: 
Files managed by conda were found to have been deleted/overwritten in the
following packages:

- setuptools 65.5.1:
    lib/python3.1/site-packages/_distutils_hack/__init__.py
    lib/python3.1/site-packages/_distutils_hack/override.py
    lib/python3.1/site-packages/distutils-precedence.pth
...

Again, there hasn't been any pip-ing, so the pip message is mistaken. And again the error messages shows lib/python3.1 instead of 3.10.

Strangely, there is indeed this weird 3.1 symlink in the site packages:

$ ls -ld ~/.conda/envs/cent7/2020.11-py38/python310forge/lib/python3.1
lrwxrwxrwx  1 lev itap  10 Dec 13 00:39 python3.1 -> python3.10/
drwxr-sr-x 36 lev itap 210 Dec 13 00:39 python3.10/

I wonder if it's an artifact of a (somehwhat old) Anaconda? I did not get the error with conda-pack 0.7.0 when I used the latest downloaded Miniconda (with conda 4.12 as opposed to 4.9.2). OTOH, both conda versions create that 3.1 symlink, so somehow conda-pack is capable to trace thing in some circumstances?

@jtilly
Copy link
Contributor

jtilly commented Dec 13, 2022

I can reproduce your issue with conda-pack 0.6.0 when pulling it from anaconda (but I don't think there's anything we can do about that).

I can't reproduce your issue with conda-pack 0.7.0 from conda-forge.

Can you please run and report the output from:

conda create -y -f -n python310forge -c conda-forge python=3.10 conda-pack
conda activate python310forge
conda info
conda list
which conda-pack  # just to make sure we're using the correct conda-pack executable
conda-pack --version
conda-pack

You can also run conda-pack with --ignore-missing-files, which will get rid of the error message (but might just kick the can down the road).

The python3.1 symlink isn't necessarily an issue. It comes with python3.10 by default.

Edit: I somehow missed your comment about the conda versions. Yes: I can reproduce your issue with conda 4.9.2 and conda-pack 0.7.0 from conda-forge. Adding the --ignore-missing-files flag fixes the issue for me and I can properly unpack the resulting environment without issues. So maybe try that if upgrading conda is not an option?

@lgorenstein
Copy link

Thank you Jan. This being a centralized installation on an HPC cluster, updating its version of conda is, let's say, a process. So having a functional workaround with --ignore-missing-files for older Anacondas is extremely useful! I did run into problem during extracting the packaged tarball - please see my next post in this thread with detailed description.


For completeness sake, here's the report the commands you requested:

$ module load anaconda/2020.11-py38
$ conda create -y -f -n python310forge -c conda-forge python=3.10 conda-pack
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.9.2
  latest version: 22.11.1

Please update conda by running

    $ conda update -n base -c defaults conda


## Package Plan ##

  environment location: /home/lev/.conda/envs/cent7/2020.11-py38/python310forge

  added / updated specs:
    - conda-pack
    - python=3.10

The following NEW packages will be INSTALLED:

  _libgcc_mutex      conda-forge/linux-64::_libgcc_mutex-0.1-conda_forge
  _openmp_mutex      conda-forge/linux-64::_openmp_mutex-4.5-2_gnu
  bzip2              conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
  ca-certificates    conda-forge/linux-64::ca-certificates-2022.12.7-ha878542_0
  conda-pack         conda-forge/noarch::conda-pack-0.7.0-pyh6c4a22f_0
  ld_impl_linux-64   conda-forge/linux-64::ld_impl_linux-64-2.39-hcc3a1bd_1
  libffi             conda-forge/linux-64::libffi-3.4.2-h7f98852_5
  libgcc-ng          conda-forge/linux-64::libgcc-ng-12.2.0-h65d4601_19
  libgomp            conda-forge/linux-64::libgomp-12.2.0-h65d4601_19
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  libsqlite          conda-forge/linux-64::libsqlite-3.40.0-h753d276_0
  libuuid            conda-forge/linux-64::libuuid-2.32.1-h7f98852_1000
  libzlib            conda-forge/linux-64::libzlib-1.2.13-h166bdaf_4
  ncurses            conda-forge/linux-64::ncurses-6.3-h27087fc_1
  openssl            conda-forge/linux-64::openssl-3.0.7-h0b41bf4_1
  pip                conda-forge/noarch::pip-22.3.1-pyhd8ed1ab_0
  python             conda-forge/linux-64::python-3.10.8-h4a9ceb5_0_cpython
  readline           conda-forge/linux-64::readline-8.1.2-h0f457ee_0
  setuptools         conda-forge/noarch::setuptools-65.5.1-pyhd8ed1ab_0
  tk                 conda-forge/linux-64::tk-8.6.12-h27826a3_0
  tzdata             conda-forge/noarch::tzdata-2022g-h191b570_0
  wheel              conda-forge/noarch::wheel-0.38.4-pyhd8ed1ab_0
  xz                 conda-forge/linux-64::xz-5.2.6-h166bdaf_0

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate python310forge
#
# To deactivate an active environment, use
#
#     $ conda deactivate

Then

$ conda activate python310forge
$ conda info

     active environment : python310forge
    active env location : /home/lev/.conda/envs/cent7/2020.11-py38/python310forge
            shell level : 1
       user config file : /home/lev/.condarc
 populated config files : /home/lev/.condarc
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /apps/spack/bell/apps/anaconda/2020.11-py38-gcc-4.8.5-nhzhrm2  (read only)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /apps/spack/bell/apps/anaconda/2020.11-py38-gcc-4.8.5-nhzhrm2/pkgs
                          /home/lev/.conda/pkgs
       envs directories : /home/lev/.conda/envs/cent7/2020.11-py38
                          /home/lev/.conda/envs
                          /apps/spack/bell/apps/anaconda/2020.11-py38-gcc-4.8.5-nhzhrm2/envs
               platform : linux-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Linux/3.10.0-1160.76.1.el7.x86_64 centos/7.9.2009 glibc/2.17
                UID:GID : 27004:6751
             netrc file : None
           offline mode : False

$ conda list
# packages in environment at /home/lev/.conda/envs/cent7/2020.11-py38/python310forge:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
ca-certificates           2022.12.7            ha878542_0    conda-forge
conda-pack                0.7.0              pyh6c4a22f_0    conda-forge
ld_impl_linux-64          2.39                 hcc3a1bd_1    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libgcc-ng                 12.2.0              h65d4601_19    conda-forge
libgomp                   12.2.0              h65d4601_19    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libsqlite                 3.40.0               h753d276_0    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libzlib                   1.2.13               h166bdaf_4    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
openssl                   3.0.7                h0b41bf4_1    conda-forge
pip                       22.3.1             pyhd8ed1ab_0    conda-forge
python                    3.10.8          h4a9ceb5_0_cpython    conda-forge
readline                  8.1.2                h0f457ee_0    conda-forge
setuptools                65.5.1             pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tzdata                    2022g                h191b570_0    conda-forge
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge

And

$ conda-pack --version
conda-pack 0.7.0

$ conda-pack
Collecting packages...
CondaPackError: 
Files managed by conda were found to have been deleted/overwritten in the
following packages:

- conda-pack 0.7.0:
    lib/python3.1/site-packages/conda_pack-0.7.0.dist-info/INSTALLER
    lib/python3.1/site-packages/conda_pack-0.7.0.dist-info/LICENSE.txt
    lib/python3.1/site-packages/conda_pack-0.7.0.dist-info/METADATA
    + 19 others
- wheel 0.38.4:
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/PKG-INFO
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/SOURCES.txt
    lib/python3.1/site-packages/wheel-0.38.4-py3.11.egg-info/dependency_links.txt
    + 21 others
- pip 22.3.1:
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/PKG-INFO
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/SOURCES.txt
    lib/python3.1/site-packages/pip-22.3.1-py3.11.egg-info/dependency_links.txt
    + 498 others
- setuptools 65.5.1:
    lib/python3.1/site-packages/_distutils_hack/__init__.py
    lib/python3.1/site-packages/_distutils_hack/override.py
    lib/python3.1/site-packages/distutils-precedence.pth
    + 238 others

This is usually due to `pip` uninstalling or clobbering conda managed files,
resulting in an inconsistent environment. Please check your environment for
conda/pip conflicts using `conda list`, and fix the environment by ensuring
only one version of each package is installed (conda preferred).

@luismarquezgft
Copy link
Author

It works. I was running conda pack instead of conda-pack.

Thank you very much for your help.

This is the code (adapted from your example @jtilly):

conda create -y -f -n python310forge -c conda-forge python=3.10 conda-pack
conda activate python310forge
...
conda-pack

@lgorenstein
Copy link

I do not think this is complete, though.

With --ignore-missing-files, the very same python310forge environment packed as expected:

$ conda-pack --ignore-missing-files 
Collecting packages...
Packing environment at '/home/lev/.conda/envs/cent7/2020.11-py38/python310forge' to 'python310forge.tar.gz'
[########################################] | 100% Completed |  8.4s

However, I have received an error message upon unpacking:

$ module load anaconda/2020.11-py38
$ mkdir $HOME/.conda/envs/cent7/2020.11-py38/XXX
$ tar -xf python310forge.tar.gz -C $HOME/.conda/envs/cent7/2020.11-py38/XXX
tar: lib/python3.1: Cannot create symlink to `python3.10': File exists
tar: Exiting with failure status due to previous errors

The resulting environment activated and seemed to work, but the untaring error looks a bit scary, and it would definitely spook people.

Looking into the tarball, it seems that there are a lot of lines with normal lib/python3.10/...., a line with lib/python3.1 -> python3.10, and then a bunch of

lib/python3.1/site-packages/conda_pack-0.7.0.dist-info/INSTALLER link to lib/python3.10/site-packages/conda_pack-0.7.0.dist-info/INSTALLER

(note the symlink to a file inside python3.1 in addition to the python3.1 itself). And this is causing the error message, because upon unpacking the lib/python3.1 gets created as a directory rather than as a symlink):

$ ls -ld ~/.conda/envs/cent7/2020.11-py38/*/lib/python3.1*
lrwxrwxrwx  1 lev itap  10 Dec 13 09:27 /home/lev/.conda/envs/cent7/2020.11-py38/python310forge/lib/python3.1 -> python3.10/
drwxr-sr-x 36 lev itap 210 Dec 13 09:27 /home/lev/.conda/envs/cent7/2020.11-py38/python310forge/lib/python3.10/

drwxr-sr-x  3 lev itap   3 Dec 13 10:18 /home/lev/.conda/envs/cent7/2020.11-py38/XXX/lib/python3.1/
drwxr-sr-x 36 lev itap 210 Dec 13 10:18 /home/lev/.conda/envs/cent7/2020.11-py38/XXX/lib/python3.10/

(note how the original environment has a symlink, but the extracted one has two distinct directories)

@luismarquezgft
Copy link
Author

Hi @lgorenstein. I ran the customized Python backend in a Triton server (local docker), and it loaded successfully. Now we are trying to load it into a Kubernetes cluster.
I would like to help with the error you reported, but honestly, I don't know what is going on with that symlink or what it implies.

@lgorenstein
Copy link

@luismarquezgft sure, I totally understand. I believe this symlink handling is a glitch in conda-pack - that's why I posted it here for @jtilly to look at.

The --ignore-missing-files is a nice workaround, but as Jan said, it might just kick the can down the road. The fact that the unpacked environment does not match the original one is worrisome, and it can bite later. That's why I do not think the issue is fully resolved and propose to keep it open for Jan.

@lgorenstein
Copy link

lgorenstein commented Dec 13, 2022

But I am happy to spin it off as a separate issue, if that makes more sense for you, @jtilly

@jtilly
Copy link
Contributor

jtilly commented Dec 21, 2022

@lgorenstein I don't think anybody will want to invest a lot of time into fixing this given that it works with more recent versions of conda. (That's correct, right?). It's my understanding that the lib/python3.1 symlink doesn't do much and can safely be removed from the environment.

So you could just run conda-pack like this:

conda-pack -f --ignore-missing-files --exclude lib/python3.1

Full example that I can run with conda=4.9.2:

conda create -y -f -n python310 -c conda-forge python=3.10 conda-pack
conda activate python310
conda-pack -f --ignore-missing-files --exclude lib/python3.1
mkdir -p out
tar -xf python310.tar.gz -C out

@morotti
Copy link

morotti commented Jul 28, 2023

for anybody who is facing the same issue, you are using an old conda version, you need to upgrade conda.

changelog: https://conda.io/projects/continuumio-conda/en/latest/release-notes.html#id73

conda 4.11.0 (2021-11-22)

  • Support Python 3.10 in version parser.

conda 4.10.0 (2021-03-30)

  • Properly parse Python version >= 3.10 (#10478)

@jkh1
Copy link

jkh1 commented Aug 3, 2023

Error still there with conda 23.5.2 (tested with the continuumio/miniconda3:23.5.2 docker container).
If lib/python3.1 can safely be excluded, why not simply remove it? It would also be useful to mention the issue and the workaround in the documentation.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Archived in project
Development

No branches or pull requests

5 participants