`conda init powershell`导致一个奇怪的字符

时间:2020-09-12 14:23:57

标签: python powershell conda

命令conda init powershell在前面的提示符中添加当前的python env名称,但是在基座前面还有一个奇怪的字符'',如何将其删除?

PowerShell 7.1.0-preview.3
Copyright (c) Microsoft Corporation.

   base  ~\..\..\Python  ipython
Python 3.7.7 (default, May  6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: ord('')
Out[1]: 58886

In [2]:

conda init powershell结果:

⨯  ~\..\..\Python  conda init powershell
no change     C:\Python\Scripts\conda.exe
no change     C:\Python\Scripts\conda-env.exe
no change     C:\Python\Scripts\conda-script.py
no change     C:\Python\Scripts\conda-env-script.py
no change     C:\Python\condabin\conda.bat
no change     C:\Python\Library\bin\conda.bat
no change     C:\Python\condabin\_conda_activate.bat
no change     C:\Python\condabin\rename_tmp.bat
no change     C:\Python\condabin\conda_auto_activate.bat
no change     C:\Python\condabin\conda_hook.bat
no change     C:\Python\Scripts\activate.bat
no change     C:\Python\condabin\activate.bat
no change     C:\Python\condabin\deactivate.bat
no change     C:\Python\Scripts\activate
no change     C:\Python\Scripts\deactivate
no change     C:\Python\etc\profile.d\conda.sh
no change     C:\Python\etc\fish\conf.d\conda.fish
no change     C:\Python\shell\condabin\Conda.psm1
no change     C:\Python\shell\condabin\Conda.psm1
no change     C:\Python\shell\condabin\conda-hook.ps1
no change     C:\Python\Lib\site-packages\xontrib\conda.xsh
no change     C:\Python\etc\profile.d\conda.csh
modified      %USERPROFILE%\Documents\PowerShell\profile.ps1
modified      %USERPROFILE%\Documents\WindowsPowerShell\profile.ps1

==> For changes to take effect, close and re-open your current shell. <==

这两个修改是

#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "C:\Python\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion

0 个答案:

没有答案
相关问题