Skip to content

conda 22.9.0 breaks bash command prompt #11885

@SimonPeatman

Description

@SimonPeatman

What happened?

I have upgraded from 4.14.0 to 22.9.0 and now my bash command prompt is broken. I used to see:
(conda-env) hostname:/path/to/working/dir$

But now I just get:
(conda-env)

In other words, rather than prepending the name of the conda environment in parentheses to the value of the PS1 environment variable, conda is overwriting PS1 altogether. Doing conda deactivate leaves PS1 as an empty string.

The Fix

Run the following and restart your shell for the changes to take effect:

conda init bash

See: #11885 (comment)

Conda Details

conda info
active environment : himawari
    active env location : /home/users/peatman/miniconda3/envs/himawari
            shell level : 2
       user config file : /home/users/peatman/.condarc
 populated config files : /home/users/peatman/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.7.final.0
       virtual packages : __linux=3.10.0=0
                          __glibc=2.17=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/users/peatman/miniconda3  (writable)
      conda av data dir : /home/users/peatman/miniconda3/etc/conda
  conda av metadata url : None
           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 : /home/users/peatman/miniconda3/pkgs
                          /home/users/peatman/.conda/pkgs
       envs directories : /home/users/peatman/miniconda3/envs
                          /home/users/peatman/.conda/envs
               platform : linux-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.7 Linux/3.10.0-1160.66.1.el7.x86_64 centos/7.9.2009 glibc/2.17
                UID:GID : 7050034:26030
             netrc file : /home/users/peatman/.netrc
           offline mode : False
conda config
==> /home/users/peatman/.condarc <==
auto_activate_base: False
conda list
# packages in environment at /home/users/peatman/miniconda3/envs/himawari:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main    defaults
_openmp_mutex             5.1                       1_gnu    defaults
boost-cpp                 1.70.0               ha2d47e9_1    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.18.1               h7f98852_0    conda-forge
ca-certificates           2022.07.19           h06a4308_0    defaults
cairo                     1.16.0               h19f5f5c_2    defaults
certifi                   2022.9.14        py39h06a4308_0    defaults
cfitsio                   3.470                hb418390_7    conda-forge
curl                      7.84.0               h5eee18b_0    defaults
expat                     2.2.10               h9c3ff4c_0    conda-forge
fontconfig                2.13.1               h6c09931_0    defaults
freetype                  2.10.4               h0708190_1    conda-forge
freexl                    1.0.6                h7f98852_0    conda-forge
gdal                      3.4.1            py39h2c27f0e_0    defaults
geos                      3.8.0                he6710b0_0    defaults
geotiff                   1.7.0                hd69d5b1_0    defaults
giflib                    5.2.1                h36c2ea0_2    conda-forge
glib                      2.69.1               h4ff587b_1    defaults
hdf4                      4.2.13               h3ca952b_2    defaults
hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
icu                       58.2              hf484d3e_1000    conda-forge
jpeg                      9e                   h166bdaf_1    conda-forge
json-c                    0.13.1            hbfbb72e_1002    conda-forge
kealib                    1.4.14               hb50703a_1    defaults
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.19.3               h3790be6_0    conda-forge
ld_impl_linux-64          2.38                 h1181459_1    defaults
libblas                   3.9.0           15_linux64_openblas    conda-forge
libcblas                  3.9.0           15_linux64_openblas    conda-forge
libcurl                   7.84.0               h91b91d3_0    defaults
libdap4                   3.19.1               h6ec2957_0    defaults
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.3                  he6710b0_2    defaults
libgcc-ng                 11.2.0               h1234567_1    defaults
libgdal                   3.4.1                h05199a0_1    defaults
libgfortran-ng            12.1.0              h69a702a_16    conda-forge
libgfortran5              12.1.0              hdcd56e2_16    conda-forge
libgomp                   11.2.0               h1234567_1    defaults
libkml                    1.3.0             h4fcabce_1010    conda-forge
liblapack                 3.9.0           15_linux64_openblas    conda-forge
libmagic                  5.39                 h27826a3_0    conda-forge
libnetcdf                 4.8.1                h42ceab0_1    defaults
libnghttp2                1.46.0               hce63b2e_0    defaults
libopenblas               0.3.20          pthreads_h78a6416_0    conda-forge
libpng                    1.6.37               hbc83047_0    defaults
libpq                     12.9                 h16c4e8d_3    defaults
libspatialite             4.3.0a              hbedb2dc_20    defaults
libssh2                   1.10.0               ha56f1ee_2    conda-forge
libstdcxx-ng              11.2.0               h1234567_1    defaults
libtiff                   4.2.0                hecacb30_2    defaults
libuuid                   1.0.3                h7f8727e_2    defaults
libwebp-base              1.2.2                h7f8727e_0    defaults
libxcb                    1.15                 h7f8727e_0    defaults
libxml2                   2.9.14               h74e7548_0    defaults
libzip                    1.8.0                h5cef20c_0    defaults
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
ncurses                   6.3                  h5eee18b_3    defaults
numpy                     1.22.3           py39hc58783e_2    conda-forge
openjpeg                  2.3.1                hf7af979_3    conda-forge
openssl                   1.1.1q               h7f8727e_0    defaults
pcre                      8.45                 h9c3ff4c_0    conda-forge
pip                       22.1.2           py39h06a4308_0    defaults
pixman                    0.40.0               h36c2ea0_0    conda-forge
poppler                   0.81.0               h01f5e8b_2    defaults
poppler-data              0.4.11               hd8ed1ab_0    conda-forge
proj                      6.2.1                hc80f0dc_0    conda-forge
python                    3.9.13               haa1d7c7_1    defaults
python-magic              0.4.27           py39hf3d152e_2    conda-forge
python_abi                3.9                      2_cp39    conda-forge
readline                  8.1.2                h7f8727e_1    defaults
setuptools                63.4.1           py39h06a4308_0    defaults
sqlite                    3.39.2               h5082296_0    defaults
tiledb                    2.3.3                h1132f93_2    defaults
tk                        8.6.12               h1ccaba5_0    defaults
tzdata                    2022c                h04d1e81_0    defaults
wheel                     0.37.1             pyhd3eb1b0_0    defaults
xerces-c                  3.2.3                h780794e_0    defaults
xz                        5.2.5                h7f8727e_1    defaults
zlib                      1.2.12               h5eee18b_3    defaults
zstd                      1.5.2                ha4553b6_0    defaults

Metadata

Metadata

Labels

backlogissue has been triaged but has not been earmarked for any upcoming releasecli::posixpertains to the CLI in Posix compliant shells (e.g. Bash, Zsh, KornShell, etc.)duplicate::primaryif an issue/PR has duplicates, this is the consolidated, primary issue/PRlocked[bot] locked due to inactivityseverity::4low; functionality is inconvenientsource::communitycatch-all for issues filed by community memberstype::bugdescribes erroneous operation, use severity::* to classify the type

Type

No type

Projects

Status

🏁 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions