博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ubuntu18机器学习环境安装基于anaconda
阅读量:4295 次
发布时间:2019-05-27

本文共 2660 字,大约阅读时间需要 8 分钟。

环境搞坏了,conda无法识别了

删除:rm -rf anaconda3

rm -rf .conda

修改.bashrc

 

20181210,第二次,

1,安装anaconda4.2

source activate root

执行:

pip -V

sudo pip -V

=>sudo pip 和pip指向不同

find . -name pip

=>真实可用的pip命令有2个

 

2,创建新环境,升级新环境pip,核对新旧环境pip不同

conda create -n py35 python=3.5

source activate py35 && pip install --upgrade pip && pip -V(在升级pip之前应当conda install pip 为独立环境py35安装独立pip,但这里没执行也好了,之前是不行的,pip是同一个,会和root同步升级)

和source activate root & pip -V结果已经不同了,说明pip环境的确独立了

(source activate root && pip -V)

 

 

3,安装公共组件

pip install xgboost && pip list|grep xgboost,有

source activate root && pip list|grep xgboost,无

说明环境独立ok

配置alias:alias pip_py35='sudo  /home/john/anaconda3/envs/py35/bin/pip'。source ~/.bashrc

 

pip_py35 install minepy

pip_py35 install tpot (source activate root && pip list|grep TPOT,无。source activate py35 && pip list|grep TPOT,有.pip_py35|grep TPOT,有 )

pip_py35 install auto_ml (source activate root && pip list|grep auto-ml,无。source activate py35 && pip list|grep auto-ml,有.pip_py35|grep auto-ml,有 )

以上命令,在系统sh中,激活root的sh中都可以执行,并且都可以正确安装,

 

4,环境mlbox(clone py35)

conda create -n mlbox --clone py35 &&  conda env list && source activate mlbox

检查: pip -V,9.0,不正常,应当继承py35的版本18,暂不理会

pip list|grep TPOT,有,正常

pip list|grep auto-ml,有,正常

pip install --upgrade pip && pip -V,提示已经up to date了。暂不理会

 

pip install mlbox提示xgboost不满足版本条件

改采用之前的代码方式安装

cd ~/PYTHON/MLBox/python-package/ && python setup.py install

报错:

['matplotlib>=2.0.2', 'hyperopt>=0.1', 'Keras>=2.0.4', 'joblib>=0.11', 'Theano>=0.9.0', 'networkx>=1.11']

Please install them manually

 

error: Aborting

解决:pip install matplotlib hyperopt Keras joblib Theano networkx,执行ok

在执行:cd ~/PYTHON/MLBox/python-package/ && python setup.py install。执行ok

检查: pip list|grep mlbox,有。

添加alias别名

alias pip_mlbox='sudo /home/john/anaconda3/envs/mlbox/bin/pip'。source ~/.bashrc

验证别名:pip_mlbox list|grep mlbox,有,正常。

 

 

5,环境autosklearn(clone mlbox)

conda create -n autosklearn --clone mlbox && conda env list && source activate autosklearn &&pip -V,版本为9.0,mlbox也是9.0,暂认为正确

pip install --upgrade pip && pip -V,提示已经up to date了。暂不理会

参考git安装指导:https://github.com/automl/auto-sklearn/blob/master/doc/installation.rst

curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip install

安装报错pyrfr。

参考:Can't install auto-sklearn due to pyrfr dependency #101,https://github.com/automl/auto-sklearn/issues/101

    {

        conda install swig --yes

        pip install  pyrfr # probably don't need this b/c it reinstalls in auto-sklearn

        pip install auto-sklearn

    }

pip install auto-sklearn。ok

 

7,qtia

pip_autosklearn install seaborn

pip_autosklearn install mlxtend

 

 

 

参考:

MAC中Python如何通过pip将packages安装到Conda环境中:https://www.jianshu.com/p/7e4c29a26f29

转载地址:http://tqyws.baihongyu.com/

你可能感兴趣的文章
PCB反推理念
查看>>
京东技术架构(一)构建亿级前端读服务
查看>>
git 提示:error: unable to rewind rpc post data - try increasing http.postBuffer
查看>>
php 解决json_encode中文UNICODE转码问题
查看>>
LNMP 安装 thinkcmf提示404not found
查看>>
PHP empty、isset、innull的区别
查看>>
apache+nginx 实现动静分离
查看>>
通过Navicat远程连接MySQL配置
查看>>
phpstorm开发工具的设置用法
查看>>
Linux 系统挂载数据盘
查看>>
Git基础(三)--常见错误及解决方案
查看>>
Git(四) - 分支管理
查看>>
PHP Curl发送数据
查看>>
HTTP协议
查看>>
HTTPS
查看>>
git add . git add -u git add -A区别
查看>>
apache下虚拟域名配置
查看>>
session和cookie区别与联系
查看>>
PHP 实现笛卡尔积
查看>>
Laravel中的$loop
查看>>