一啃洋、安裝Python3.7.6(此步忽略宏娄。安裝后各種問題孵坚,卸載了卖宠,通過anaconda安裝沒有問題)
https://www.python.org/downloads/release/python-381/
二忧饭、裝anaconda
https://www.anaconda.com/
三、安裝openCV和TensorFlow
安裝好anaconda后刺洒,安裝openCV和tensorflow作媚,你還要做下面這些事:
1.首先將anaconda換源纸泡,替換成清華源赖瞒,剛開始沒換源更新速度超級(jí)很慢栏饮,換源步驟如下:
在anaconda?prompt命令行下執(zhí)行如下語句
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
2.換源成功后,啟動(dòng)anaconda?prompt或cmd(以管理員身份運(yùn)行)境蔼,然后更新箍土,這樣你就能用到最新的pip罐监,python3.7,conda
步驟如下:
conda update ipykernel
然后更新pip
conda update pip
然后更新全部組件
conda update --all
如果出錯(cuò)沟堡,可以換成
conda update -n base conda
PS:如上過程如有因下載不下來停止報(bào)錯(cuò)的情況航罗,重新執(zhí)行語句會(huì)繼續(xù)下載安裝上一次未完成的內(nèi)容
3.安裝openCV
方法一:(不可行)在命令行下cd到.whl文件的所在目錄,執(zhí)行 下面的語句
pip install opencv_python-4.2.0-cp37-cp37m-win_amd64.whl
坑點(diǎn):需注意openCV的版本需和python版本一致燕侠,否則安裝會(huì)報(bào)如下錯(cuò)誤
安裝下載地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
另附錯(cuò)誤解決辦法:https://blog.csdn.net/sinat_26811377/article/details/99947448
方法二:pip install opencv-contrib-python? ?opencv-python
方法三:anaconda?下(測(cè)試七问,不可行)
這種方式對(duì)anaconda python開發(fā)套件下并不起作用械巡。經(jīng)測(cè)試比較可行的方法是讥耗,在命令行輸入:
conda install --channel https://conda.anaconda.org/menpo opencv3
然后根據(jù)提示古程,輸入一些簡(jiǎn)單的命令如[y]\n? 輸入y挣磨,等待更新安裝即可茁裙。
方法四:C.win10 anaconda3環(huán)境安裝OpenCV3.4(經(jīng)測(cè)試可行)
https://blog.csdn.net/xrinosvip/article/details/83032216
方法五:在Anaconda?environment?中找到OpenCV? 點(diǎn)擊右下角apply。(此方法在安裝tensorflow下的OpenCV可行掉蔬,但在base下安裝時(shí)總報(bào)錯(cuò),也不知道為啥)
4.現(xiàn)在就可以安裝tensorflow了,請(qǐng)執(zhí)行如下命令
conda create -n tensorflow python=3.6
然后進(jìn)入Anaconda Navigator谈喳,點(diǎn)environment婿禽,你會(huì)發(fā)現(xiàn)出現(xiàn)了tensorflow赏僧,然后在Anaconda Prompt中啟動(dòng)tensorflow環(huán)境
activate tensorflow
然后安裝tensorflow-cpu
pip install --upgrade --ignore-installed tensorflow
pip install tensorflow
(指定數(shù)據(jù)源和版本的)
pip install tensorflow==1.13.1-i https://pypi.tuna.tsinghua.edu.cn/simple
5.之后大家可以進(jìn)入Anaconda Navigator中,在tensorflow環(huán)境下配置Spyder扭倾,就可以愉快地使用Anaconda自帶的python IDE了淀零。
參考:
ython 3.7.4 安裝 opencv?:https://www.cnblogs.com/yocichen/p/11646818.html
A.解決Anaconda無法更新的問題:
https://blog.csdn.net/liyebei/article/details/73477249?utm_source=blogxgwz6
B.使用anaconda安裝opencv包出現(xiàn)error的解決方法
https://blog.csdn.net/skywalker_123/article/details/94741932
https://blog.csdn.net/feiye1023/article/details/80766089?
C.win10 anaconda3環(huán)境安裝OpenCV3.4(僅需三行代碼)
https://blog.csdn.net/xrinosvip/article/details/83032216
D.安裝過程中顯示沒有cv2
https://msd.misuland.com/pd/2884250137616454730
https://www.cnblogs.com/codeit/p/11179454.html
F:anaconda+openCV終于裝好了
https://blog.csdn.net/mawonly/article/details/87856530?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task
其他實(shí)例?
http://www.uml.org.cn/ai/201910294.asp
https://www.jb51.net/article/171603.htm
https://www.cnblogs.com/dbSyk/p/10348187.html
https://edu.51cto.com/course/16898.html
https://yq.aliyun.com/articles/635856
https://blog.csdn.net/liupeng19970119/article/details/97937310