mlflow安装问题

亡梦爱人 提交于 2019-12-26 02:36:20

1.创建文件夹

mkdir mlwork

cd mlwork

2. 创建一个干净的venv环境

[hdfs@xydwtest01 ~/mlwork]$ source ~/miniconda3/bin/activate 

(root) [hdfs@xydwtest01 ~/mlwork]$ virtualenv
-bash: virtualenv: command not found

没有找到 virtualenv,需要安装virtualenv

pip install virtualenv

 virtualenv安装成功,继续

(root) [hdfs@xydwtest01 ~/mlwork]$ virtualenv --no-site-packages venv
Using base prefix '/home/hdfs/miniconda3'
New python executable in /home/hdfs/mlwork/venv/bin/python
/home/hdfs/mlwork/venv/bin/python: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory
ERROR: The executable /home/hdfs/mlwork/venv/bin/python is not functioning
ERROR: It thinks sys.prefix is '/home/hdfs/mlwork' (should be '/home/hdfs/mlwork/venv')
ERROR: virtualenv is not compatible with this system or executable 

错误:/home/hdfs/mlwork/venv/bin/python: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory

原因:python运行时没有加载到libpython3.6m.so.1.0 这个库文件,将其复制到响应目录OK,输入下列命令即可

 cp ~/miniconda3/lib/libpython3.6m.so.1.0 /usr/lib64/

 3.安装mlflow、sklearn等包

(venv) (root) [hdfs@xydwtest01 ~/mlwork]$ pip install mlflow
Looking in indexes: https://pypi.doubanio.com/simple/

安装sklearn时出问题

(venv) (root) [hdfs@xydwtest01 ~/mlwork]$ pip install sklearn
Looking in indexes: https://pypi.doubanio.com/simple/
ERROR: Could not install packages due to an EnvironmentError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check',)) 

解决方案:换个镜像源

(venv) (root) [hdfs@xydwtest01 ~/mlwork]$ pip install sklearn -i https://pypi.tuna.tsinghua.edu.cn/simple/ 

4.启动

mlflow ui 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!