tensorflow opencv 安装及部署基础步骤

anaconda官网
https://www.anaconda.com/
opencv 下载地址
https://opencv.org/releases/

修改Anaconda3中jupyter的工作目录
1.打开Anaconda Prompt,运行jupyter notebook --generate-config
2.找到当前用户下的.jupter文件夹,打开jupyter_notebook_config.py
3.找到#c.NotebookApp.notebook_dir =;去掉#,修改为c.NotebookApp.notebook_dir = '你的工作目录',示例如下
注:注意双斜杠"\\"
4.找到Jupyter Notebook文件,右键属性设置,在目标栏删除最后的"%USERPROFILE%"
5.修改完毕后,重启Juputer Notebook即可

用conda安装tensorflow
conda install tensorflow
pip uninstall tensorflow

conda install opencv

安装代码提示功能  nbextensions 
1.pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
2.安装nbextensions_configurator

pip install --user jupyter_nbextensions_configurator 
jupyter nbextensions_configurator enable --user
点击并勾选Hinteriand即可开启代码提示功能

建立anaconda虚拟环境(也可以在anaconda用可视化窗口进行操作)
在 Anaconda Prompt 窗口输入:conda create -n tensorflow3.7 python=3.7.3
activate tensorflow3.7
anaconda search -t conda tensorflow 寻找版本

删除jupyter notebook的kernel
jupyter kernelspec list
jupyter kernelspec remove tensorflow3.7

依赖包下载地址:https://pypi.org/ 各种包都有

国内安装镜像:新版ubuntu要求使用https源,要注意。
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

 

你可能感兴趣的:(人工智能)