Skip to content

fix(dev/release): call conda init before conda activate - #4584

Open
zeroshade wants to merge 1 commit into
mainfrom
fix-conda-verify
Open

fix(dev/release): call conda init before conda activate#4584
zeroshade wants to merge 1 commit into
mainfrom
fix-conda-verify

Conversation

@zeroshade

Copy link
Copy Markdown
Member

Ran into an issue when running verify-release-candidate.sh using USE_CONDA=1. Got an error specifying that we need to call conda init before conda activate base. After adding that line the verification was able to continue.

Ran into an issue when running `verify-release-candidate.sh` using `USE_CONDA=1`. Got an error specifying that we need to call `conda init` before `conda activate base`. After adding that line the verification was able to continue.
@zeroshade
zeroshade requested review from kou and lidavidm as code owners July 24, 2026 16:16
@ianmcook

Copy link
Copy Markdown
Member

After adding this line to the verification script, I'm still seeing this in the output (but it doesn't cause any failure):

=====================================
Build, install and test C++ libraries
=====================================
└ Ensuring that Go is installed...
└ Configuring Conda environment...

CondaError: Run 'conda init' before 'conda deactivate'

└ Ensuring that Conda is installed...

@lidavidm

Copy link
Copy Markdown
Member

I'm not sure we want this, doesn't conda init write to the user's bash_profile and such?

@zeroshade

Copy link
Copy Markdown
Member Author

hmm, we could add the --no-user argument so that it doesn't initialize for the current user?

@amoeba

amoeba commented Jul 28, 2026

Copy link
Copy Markdown
Member

Does that work? I just tested it and it doesn't do anything:

$ env | grep CONDA

$ conda init --no-user
-- >8 -- 
No action taken.

$ env | grep CONDA

$ conda activate adbc

CondaError: Run 'conda init' before 'conda activate'

Most users will already have run conda init so this would be adding a workaround to the verification script for users who install but don't fully set conda up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants