If PowerShell does not show or activate a Conda environment, the usual fix is to run conda init powershell, restart PowerShell, then verify conda is on PATH. If it is not, initialize the shell from the Anaconda Prompt first. Skip the wrong layer and you can end up with a prompt that never changes, conda activate errors, or a profile that keeps breaking new shells. This guide checks profile, PATH, and shell initialization in order, then gives the shortest PowerShell-specific fix.

What the symptom means in PowerShell

In PowerShell, a Conda environment may fail to appear for a few common reasons: the shell hook was never written to the profile, the profile is not loading, or PowerShell cannot find the right Conda install. Command Prompt can still work because it uses a different startup path.

Start with the shortest fix that matches the symptom. If the prompt never changes at startup, focus on initialization. If conda activate says the command is unknown, check PATH and the shell profile. If Conda works in CMD but not PowerShell, the problem is usually shell integration, not the environment itself.

Conda troubleshooting decision table

Conda troubleshooting decision table
VS Code logo beside bold text about Conda environment not working
Symptom Likely cause Quick check command Fix Expected result
Base never appears when PowerShell opens Conda was not initialized for PowerShell conda info conda init powershell, then restart PowerShell Profile gets Conda startup lines and base can load
conda activate fails with command not found Profile blocked, missing hook, or wrong Conda executable Get-Command conda Check $PROFILE, then re-run conda init powershell conda resolves to the initialized shell hook or correct executable
Conda works in Command Prompt but not PowerShell PowerShell profile not loaded or not initialized $PROFILE Inspect the profile file and remove blocks or overrides PowerShell starts with Conda hook active
conda is not recognized at all PATH missing or points to the wrong install $env:Path Repair PATH or open the correct Anaconda/Miniconda shell first PowerShell can locate the intended Conda install
Changes do not appear after fixing the profile Stale terminal session in PowerShell or Windows Terminal Get-Process pwsh, powershell Close the tab and open a new one, or restart Windows Terminal New session reads the updated profile
Initialization command fails or does nothing Execution policy or profile permissions block startup scripts Get-ExecutionPolicy -List Adjust the current user scope if allowed, then rerun initialization PowerShell can load the Conda startup block
Wrong environment appears, or multiple Conda installs conflict Anaconda and Miniconda both exist, or PATH order is wrong where conda Keep one install first in PATH and remove the other from startup PowerShell uses one predictable Conda install

Likely causes, ranked

The most common issue is missing PowerShell initialization. Less commonly, the profile file blocks the Conda hook, PATH points to the wrong install, or Windows Terminal keeps an old session alive. Start with the initialization command, then move to the profile if the shell still behaves incorrectly.

Missing conda init for PowerShell

If Conda is installed but PowerShell does not know about it, the shell hook is usually missing. The shortest fix is to write the startup changes into the PowerShell profile with conda init powershell.

  1. Open PowerShell. Use the same shell you want to fix. If you use Windows Terminal, open its PowerShell profile, not Command Prompt.
  2. Run the init command. Enter conda init powershell. This adds the startup hook to the profile PowerShell reads when it opens.
  3. Restart the shell. Close the current window or tab, then open a fresh PowerShell session. The new session must read the updated profile.
  4. Test Conda. Run conda env list and then conda activate base or conda activate <env>. A working setup shows the available environments and changes the prompt.

Profile blocked or overridden

PowerShell uses a profile file at the path shown by $PROFILE. If another startup command disables the Conda hook, or if the profile never loads, initialization will not stick. This is common when a custom prompt script runs after Conda and replaces the environment marker.

  1. Open the profile path. Run notepad $PROFILE or inspect the file in your editor. If the file does not exist, create it by running conda init powershell again.
  2. Look for Conda lines. Search for startup text that mentions Conda, usually the block added by initialization. If it is missing, rerun conda init powershell.
  3. Move conflicting lines. If your profile runs another prompt tool after Conda, place that tool before the Conda block or comment out the conflicting line. The last prompt code to run can override the display.
  4. Reload in a new session. Close PowerShell completely, then open it again. A simple dot-source reload is not enough if the profile never contained the Conda hook.

Say your prompt shows PS C:\> every time, even after conda init powershell. That usually means the shell opened a stale profile or a later startup line replaced Conda’s prompt changes.

Missing PATH or wrong Conda install

PowerShell can only start the right Conda install if it can find it. If you have both Anaconda and Miniconda, or if PATH was changed manually, PowerShell may point to the wrong executable or none at all.

  1. Check the resolver. Run Get-Command conda. If PowerShell cannot resolve it, the current session does not know where Conda lives.
  2. Inspect PATH entries. Run $env:Path and look for the Conda install you expect. PATH can differ between user scope and system scope.
  3. Check for duplicates. Run where conda. If more than one path appears, remove the unwanted install from PATH or from startup tools so one Conda wins.
  4. Repair from the right shell. Open the Anaconda Prompt or the Miniconda Prompt for the install you want, then run conda init powershell from there. That writes the hook for the active distribution.

Picture a machine with Anaconda in one user folder and Miniconda in another. PowerShell may activate the wrong copy or none at all if PATH order changes after an update.

Execution policy restrictions

PowerShell can block profile scripts when the execution policy is too strict for the current scope. In that case, Conda may be installed and present on PATH, but the profile still never loads the startup hook that makes conda activate work.

  1. Check policy scopes. Run Get-ExecutionPolicy -List. Look for the CurrentUser and LocalMachine scopes, because those are the ones that commonly affect profile loading.
  2. Allow the profile if permitted. If your environment allows it, set a less restrictive policy for the current user scope, then retry conda init powershell. Use the least change that your system policy permits.
  3. Open a new session. Restart PowerShell after the policy change. The current shell will not always pick up policy changes immediately.

Run conda init for PowerShell

Run conda init for PowerShell
A laptop displays a PowerShell window on a desk beside a small sign

conda init powershell is the standard PowerShell-specific fix because it writes the startup changes that make the Conda hook load automatically. It works with both Anaconda and Miniconda. The command does not install Conda; it only prepares PowerShell to use it.

  1. Open the Conda shell. If PowerShell cannot find conda, open the Anaconda Prompt or Miniconda Prompt for the install you want to repair.
  2. Run the init command. Enter conda init powershell and wait for it to finish writing the profile changes.
  3. Close every shell. Exit PowerShell and any Windows Terminal tabs that used the old session. Old windows keep old state.
  4. Open PowerShell again. Start a fresh shell, then run conda env list to confirm the environment list appears.

How do I activate a conda environment in PowerShell?

After initialization, use conda activate <env> to switch into a named environment, or conda activate base for the base environment. If the prompt does not change, the shell hook is still missing or the current window is stale.

  1. List available environments. Run conda env list to confirm the name you want exists.
  2. Activate the target. Run conda activate <env>, replacing <env> with the exact environment name.
  3. Check the prompt. The environment name should appear at the start of the PowerShell prompt. If it does not, reopen the shell and try again.

How do I check whether conda is added to my PowerShell profile?

Check the file at $PROFILE. If Conda initialization worked, that file should contain the startup block written by conda init powershell. If it is missing or overwritten, PowerShell will not auto-load Conda.

  1. Open the profile file. Run notepad $PROFILE or open the file path printed by $PROFILE.
  2. Search for Conda text. Look for the block added by Conda initialization. If you only see unrelated prompt customization, the Conda hook is not present.
  3. Repair the profile. Run conda init powershell again if the block is missing, then reopen PowerShell.

How do I make conda activate automatically in PowerShell?

To auto-load the base environment, initialize PowerShell and then enable Conda’s auto-activation setting with conda config --set auto_activate_base true. That setting affects new shells only, so you still need a restart after changing it.

  1. Initialize PowerShell first. Run conda init powershell if you have not already done so.
  2. Enable auto-activation. Run conda config --set auto_activate_base true.
  3. Start a new session. Close PowerShell or your Windows Terminal tab and open a new one. The base environment should appear if the profile loads correctly.

How do I fix PowerShell after installing Miniconda or Anaconda?

After either install, PowerShell often needs one setup pass: initialize the shell, then restart it. Miniconda and Anaconda both use the same Conda commands, but they may install in different locations and create different PATH conflicts.

  1. Pick one install. Decide whether Anaconda or Miniconda should be the one PowerShell uses.
  2. Open that prompt. Use the matching prompt for the chosen install, then run conda init powershell.
  3. Restart Windows Terminal. Close the tab or the whole terminal app so no old session remains.
  4. Verify the environment. Run conda env list and then conda activate base or a named environment.

Prevention: keep one Conda install first in PATH, and rerun conda init powershell after reinstalling or moving that install.

Why does conda work in Command Prompt but not PowerShell?

Command Prompt and PowerShell load startup settings differently. If Conda works in CMD but not in PowerShell, the installation is probably fine and the PowerShell profile is the missing piece. Run conda init powershell, then check $PROFILE and open a new shell.

Why is my conda environment not showing in PowerShell?

If the environment name does not appear at startup or after conda activate <env>, PowerShell usually has no active Conda hook yet. Run conda init powershell, restart the shell, and confirm with conda env list. If the environment exists but still does not show, inspect $PROFILE for overrides.

Why does 'conda activate' say command not found in PowerShell?

That usually means PowerShell cannot resolve Conda through the current shell session. Check Get-Command conda first. If it fails, initialize PowerShell with conda init powershell and, if needed, confirm PATH points to the intended Anaconda or Miniconda install.

Why does PowerShell open without the base conda environment?

The base environment does not auto-load unless Conda initialization is present and auto-activation is turned on. Use conda config --set auto_activate_base true, then open a new PowerShell window. If base still stays off, the profile is likely blocked or the old session is still running.

Keep reading

Frequently asked questions

How do I initialize conda for PowerShell?

Open the Anaconda Prompt or Miniconda Prompt for the install you want, then run conda init powershell. Close PowerShell completely and reopen it. The command writes the startup changes into the profile that PowerShell reads at launch.

Why does PowerShell work differently from Command Prompt with Conda?

PowerShell relies on a profile and shell hook, while Command Prompt uses a different startup path. That is why Conda can work in CMD and still fail in PowerShell until you run conda init powershell and restart the session.