WARNING: Running pip as the ‘root‘ user can result in broken permissions and conflicting behaviour w

数仓学习记录

1、问题

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv  

2、分析 

警告:以“root”用户身份运行pip可能会导致权限中断以及与系统包管理器的行为冲突。建议改用虚拟环境:https://pip.pypa.io/warnings/venv

3、解决方法。换用户权限

4、新问题

Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.douban.com/simple/
Requirement already satisfied: setuptools in /opt/module/miniconda3/envs/superset/lib/python3.7/site-packages (65.4.1)
Requirement already satisfied: pip in /opt/module/miniconda3/envs/superset/lib/python3.7/site-packages (22.2.2)

4.1分析

其实这是初次使用Anaconda时,没有预先对命令行进行预载的结果。解决办法非常简单,只需根据Anaconda的提示运行对应的命令即可。

Windows:

conda init cmd.exe

Linux(使用bash):

conda init bash

 4.2新问题2

For changes to take effect, close and re-open your current shell

要使更改生效,请关闭并重新打开当前shell

5、重新打开shell成功

你可能感兴趣的:(pip)