首页 技术 正文
技术 2022年11月21日
0 收藏 552 点赞 2,630 浏览 864 个字

为了开发环境纯净,应该首先创建虚拟环境

mkvirtualenv -p python3 虚拟环境名称

如,mkvirtualenv -p python3 ai

但是有的童鞋会卡在这一步,会报一个这样的错误:

OSError: Command /home/python/.virtualenvs/ai/bin/python3 – setuptools pkg_resources pip wheel failed with error code 2

这是因为virtualenv虚拟环境—-pip多版本共存导致的

解决办法可以看这个帖子:https://blog.csdn.net/dashen180309/article/details/79494016

接下来再说如何配置机器学习的开发环境

首先建一个txt文件,名字随意,比如, bao.txt

里面写上:

matplotlib==2.0.2
numpy==1.14.2
pandas==0.20.3
TA-Lib==0.4.16
tables==3.4.2
jupyter==1.0.0

然后根据在上面创建好的虚拟环境中进行安装,

  进入虚拟环境的命令:  workon 两次tab键

  workon 虚拟环境名称(首次创建默认是在虚拟环境中的)

  如

  workon ai

  退出虚拟环境的命令:deactivate

  删除虚拟环境的命令:rmvirtualenv 虚拟环境名称

在虚拟环境安装各种机器学习包的命令:

pip install -r bao.txt(就是上面写下各个包的txt文档)

以上就是机器学习入门需要的包,后面再更新

深度学习部分:

TensorFlow的安装

CPU版本

pip install tensorflow==1.8 -i https://mirrors.aliyun.com/pypi/simple
pip install tensorflow==1.8 -i https://mirrors.aliyun.com/pypi/simple

GPU版本

https://www.tensorflow.org/install/install_linux
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,905
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,430
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,247
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,058
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,690
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,727