linux服务器,个人用户目录下,conda 创建虚拟环境
# env_name 为虚拟环境名称
conda create -n env_name numpy matplotlib python=3.6.10
# 激活虚拟环境
conda activate outlier_detection_env
# 退出虚拟环境
conda deactivate
1.虚拟环境中,安装包时报错:
ERROR: No matching distribution found for pandas>=0.25 (from pyod)
原因:pandas 版本太旧,其原因是python版本太旧
解决:虚拟环境中,
-
升级python,conda install python==3.6.10
-
升级pandas,pip install pandas==1.1.1
2.使用conda activate激活环境出错
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If your shell is Bash or a Bourne variant, enable conda for the current user