yolo 安装tensorflow、keras、opencv步骤

本文档记录了在conda环境下安装tensorflow、keras和opencv的详细步骤,并展示了在安装完成后使用Yolo进行对象检测的实际操作。过程中遇到的网络问题通过更换国内镜像源解决,最后成功运行Yolo模型进行视频对象检测。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Last login: Sat Jun 20 22:39:09 on ttys007
(base) haohaoxuexi:~ liuxiaoqin$ conda create -n tensoeflow_n python=3.6
Collecting package metadata (current_repodata.json): done
Solving environment: done

> WARNING: A newer version of conda exists. <
current version: 4.8.2
latest version: 4.8.3

Please update conda by running

$ conda update -n base -c defaults conda

Package Plan

environment location: /opt/anaconda3/envs/tensoeflow_n

added / updated specs:
- python=3.6

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
certifi-2020.4.5.2         |           py36_0         157 KB
pip-20.1.1                 |           py36_1         1.8 MB
python-3.6.10              |       hf48f09d_2        17.1 MB
setuptools-47.3.0          |           py36_0         523 KB
wheel-0.34.2               |           py36_0          50 KB
------------------------------------------------------------
                                       Total:        19.6 MB

The following NEW packages will be INSTALLED:

ca-certificates pkgs/main/osx-64::ca-certificates-2020.1.1-0
certifi pkgs/main/osx-64::certifi-2020.4.5.2-py36_0
libcxx pkgs/main/osx-64::libcxx-10.0.0-1
libedit pkgs/main/osx-64::libedit-3.1.20191231-haf1e3a3_0
libffi pkgs/main/osx-64::libffi-3.3-h0a44026_1
ncurses pkgs/main/osx-64::ncurses-6.2-h0a44026_1
openssl pkgs/main/osx-64::openssl-1.1.1g-h1de35cc_0
pip pkgs/main/osx-64::pip-20.1.1-py36_1
python pkgs/main/osx-64::python-3.6.10-hf48f09d_2
readline pkgs/main/osx-64::readline-8.0-h1de35cc_0
setuptools pkgs/main/osx-64::setuptools-47.3.0-py36_0
sqlite pkgs/main/osx-64::sqlite-3.32.2-hffcf06c_0
tk pkgs/main/osx-64::tk-8.6.10-hb0a8c7a_0
wheel pkgs/main/osx-64::wheel-0.34.2-py36_0
xz pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
zlib pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3

Proceed ([y]/n)? y

Downloading and Extracting Packages
certifi-2020.4.5.2 | 157 KB | ##################################### | 100%
setuptools-47.3.0 | 523 KB | ##################################### | 100%
pip-20.1.1 | 1.8 MB | ##################################### | 100%
wheel-0.34.2 | 50 KB | ##################################### | 100%
python-3.6.10 | 17.1 MB | #################################9 | 92%

CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/main/osx-64/python-3.6.10-hf48f09d_2.conda
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.

(base) haohaoxuexi:~ liuxiaoqin$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
(base) haohaoxuexi:~ liuxiaoqin$ conda config --set show_channel_urls yes
(base) haohaoxuexi:~ liuxiaoqin$ conda create -n tensoeflow_n python=3.6
Collecting package metadata (current_repodata.json): done
Solving environment: done

> WARNING: A newer version of conda exists. <
current version: 4.8.2
latest version: 4.8.3

Please update conda by running

$ conda update -n base -c defaults conda

Package Plan

environment location: /opt/anaconda3/envs/tensoeflow_n

added / updated specs:
- python=3.6

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
certifi-2016.2.28          |           py36_0         213 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
openssl-1.0.2l             |                0         3.0 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
pip-9.0.1                  |           py36_1         1.7 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
python-3.6.2               |                0        11.7 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
readline-6.2               |                2         274 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
setuptools-36.4.0          |           py36_1         559 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
sqlite-3.13.0              |                0         1.4 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
tk-8.5.18                  |                0         1.9 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
wheel-0.29.0               |           py36_0          87 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
xz-5.2.3                   |                0         225 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
zlib-1.2.11                |                0          98 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
------------------------------------------------------------
                                       Total:        21.2 MB

The following NEW packages will be INSTALLED:

certifi anaconda/pkgs/free/osx-64::certifi-2016.2.28-py36_0
openssl anaconda/pkgs/free/osx-64::openssl-1.0.2l-0
pip anaconda/pkgs/free/osx-64::pip-9.0.1-py36_1
python anaconda/pkgs/free/osx-64::python-3.6.2-0
readline anaconda/pkgs/free/osx-64::readline-6.2-2
setuptools anaconda/pkgs/free/osx-64::setuptools-36.4.0-py36_1
sqlite anaconda/pkgs/free/osx-64::sqlite-3.13.0-0
tk anaconda/pkgs/free/osx-64::tk-8.5.18-0
wheel anaconda/pkgs/free/osx-64::wheel-0.29.0-py36_0
xz anaconda/pkgs/free/osx-64::xz-5.2.3-0
zlib anaconda/pkgs/free/osx-64::zlib-1.2.11-0

Proceed ([y]/n)? y

Downloading and Extracting Packages
tk-8.5.18 | 1.9 MB | ####################################################### | 100%
wheel-0.29.0 | 87 KB | ####################################################### | 100%
sqlite-3.13.0 | 1.4 MB | ####################################################### | 100%
xz-5.2.3 | 225 KB | ####################################################### | 100%
certifi-2016.2.28 | 213 KB | ####################################################### | 100%
setuptools-36.4.0 | 559 KB | ####################################################### | 100%
zlib-1.2.11 | 98 KB | ####################################################### | 100%
openssl-1.0.2l | 3.0 MB | ####################################################### | 100%
python-3.6.2 | 11.7 MB | ####################################################### | 100%
pip-9.0.1 | 1.7 MB | ####################################################### | 100%
readline-6.2 | 274 KB | ####################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

To activate this environment, use

$ conda activate tensoeflow_n

To deactivate an active environment, use

$ conda deactivate

(base) haohaoxuexi:~ liuxiaoqin$ conda activate tensorflow_n
Could not find conda environment: tensorflow_n
You can list all discoverable environments with conda info --envs.

(base) haohaoxuexi:~ liuxiaoqin$ conda env list

conda environments:

base * /opt/anaconda3
tensoeflow_n /opt/anaconda3/envs/tensoeflow_n
tensorflow /opt/anaconda3/envs/tensorflow

(base) haohaoxuexi:~ liuxiaoqin$ conda activate tensoeflow_n
(tensoeflow_n) haohaoxuexi:~ liuxiaoqin$ conda list

packages in environment at /opt/anaconda3/envs/tensoeflow_n:

Name Version Build Channel

certifi 2016.2.28 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
openssl 1.0.2l 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
pip 9.0.1 py36_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
python 3.6.2 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
readline 6.2 2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
setuptools 36.4.0 py36_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
sqlite 3.13.0 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
tk 8.5.18 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
wheel 0.29.0 py36_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
xz 5.2.3 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
zlib 1.2.11 0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
(tensoeflow_n) haohaoxuexi:~ liuxiaoqin$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow1.14.0
Collecting tensorflow
1.14.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/27/8c/7608ba709bd536bc2bccb0d1abbb70aafe9cf7e0170353b4b720ed54cb71/tensorflow-1.14.0-cp36-cp36m-macosx_10_11_x86_64.whl (105.8MB)
100% |████████████████████████████████| 105.8MB 3.4kB/s
Collecting keras-preprocessing>=1.0.5 (from tensorflow1.14.0)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/79/4c/7c3275a01e12ef9368a892926ab932b33bb13d55794881e3573482b378a7/Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42kB)
100% |████████████████████████████████| 51kB 3.2MB/s
Collecting absl-py>=0.7.0 (from tensorflow
1.14.0)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/1a/53/9243c600e047bd4c3df9e69cfabc1e8004a82cac2e0c484580a78a94ba2a/absl-py-0.9.0.tar.gz (104kB)
100% |████████████████████████████████| 112kB 3.5MB/s
Collecting numpy<2.0,>=1.14.5 (from tensorflow1.14.0)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ae/47/fc66812fec2cdbdac2cdbc7788ce55fb2072bae5326279079fb00b765b50/numpy-1.18.5-cp36-cp36m-macosx_10_9_x86_64.whl (15.1MB)
100% |████████████████████████████████| 15.1MB 27kB/s
Collecting tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 (from tensorflow
1.14.0)
Downloading

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值