在cmd和powershell中,当我输入conda init powershell
时,它总是失败如下:
(ifcmapping) C:\Windows\system32>conda init powershell
no change C:\Users\haoli\anaconda3\Scripts\conda.exe
no change C:\Users\haoli\anaconda3\Scripts\conda-env.exe
no change C:\Users\haoli\anaconda3\Scripts\conda-script.py
no change C:\Users\haoli\anaconda3\Scripts\conda-env-script.py
no change C:\Users\haoli\anaconda3\condabin\conda.bat
no change C:\Users\haoli\anaconda3\Library\bin\conda.bat
no change C:\Users\haoli\anaconda3\condabin\_conda_activate.bat
no change C:\Users\haoli\anaconda3\condabin\rename_tmp.bat
no change C:\Users\haoli\anaconda3\condabin\conda_auto_activate.bat
no change C:\Users\haoli\anaconda3\condabin\conda_hook.bat
no change C:\Users\haoli\anaconda3\Scripts\activate.bat
no change C:\Users\haoli\anaconda3\condabin\activate.bat
no change C:\Users\haoli\anaconda3\condabin\deactivate.bat
no change C:\Users\haoli\anaconda3\Scripts\activate
no change C:\Users\haoli\anaconda3\Scripts\deactivate
no change C:\Users\haoli\anaconda3\etc\profile.d\conda.sh
no change C:\Users\haoli\anaconda3\etc\fish\conf.d\conda.fish
no change C:\Users\haoli\anaconda3\shell\condabin\Conda.psm1
no change C:\Users\haoli\anaconda3\shell\condabin\conda-hook.ps1
no change C:\Users\haoli\anaconda3\Lib\site-packages\xontrib\conda.xsh
no change C:\Users\haoli\anaconda3\etc\profile.d\conda.csh
needs sudo C:\Users\haoli\OneDrive\??\WindowsPowerShell\profile.ps1
No action taken.
Operation failed.
我已经开始当行政长官了。如何解决这个问题?谢谢!
发布于 2022-04-27 10:41:58
在这里
C:\Users\haoli\OneDrive??\WindowsPowerShell\profile.ps1需要sudo
我想?\\不是英文字母,你需要把它改成英语。
检查onedrive在线,它是英语在我的本地电脑,但不是在云中的英语。我将云中的文件夹名更改为“Documents”( PowerShell所在的位置),并将更改同步到本地。为我工作过。
发布于 2022-10-08 21:10:33
在Windows上,当您让OneDrive备份您的文档文件夹时,文件夹指向云中的Documents文件夹,它的实际名称取决于您的系统的语言,我假设它在您的情况下是"文档“。
我刚刚在OneDrive设置中禁用了文档备份,然后重新运行conda init
,这给了我结果。
C:\Users\username\Documents\WindowsPowerShell\profile.ps1改性
如果您不希望禁用OneDrive备份,可以尝试紫鑫的回答,我只是不确定您是否应该处理备份文件夹的默认设置,以及它是否会导致问题。
https://stackoverflow.com/questions/70721553
复制相似问题