參考網上大神的方法
1 官網下載安裝
2 下載指定版本的源碼cmake安裝
3 Mac上使用homebrew進行安裝(強烈推薦,主要是前兩種的openssl模塊我沒有搞定鏈接什么的一直報錯,一個個下載后添加實在是太煩了)
homebrew會自動安裝最新的python-3.7.2 而我們的faceWap最多支持的3.6,所以需要我們 安裝指定版本的python3
https://github.com/Homebrew/homebrew-core/search?q=python3.6&type=Commits 在github上下載3.6版本的rb源
選擇raw,后下載源碼到本地,
brew install 本地地址
編譯過程中會報錯,注釋這兩段代碼
# cd "Doc" do
# system "make", "html"
# doc.install Dir["build/html/*"]
# end
和import ""
#
再次編譯brew install 本地地址成功如果庫缺失的話使用homebrew下載就好了
因為以前安裝過沒有刪除鏈接導致pip3安裝不上
刪除 /usr/local/lib/python3.6后好了
編譯facewap
cd faceswap-master
安裝cmake 和dlib
homebrew install cmake
報錯因為我已下載過cmake
Warning: cmake 3.14.0 is already installed, it's just not linked
You can use `brew link cmake` to link this version.
V_JUNZYU-MC0:dlib-19.9.0 yujunzhen$ brew link cmake
cmake sucesss
安裝dlib
pip3 install dlib
成功
在文件中添加tensorflow==1.12
pip3 install -r requirements.txt
permissionError: [Errno 13] Permission denied: '/usr/local/bin/f2py'
權限問題,在命令行中添加--user
pip3 install -r requirements.txt --user
成功后
cd faceswap-master
python3 setup.py install
手動添加依賴
python3 setup.py install (tar解壓后)和pip3 install cmake-3.13.3-cp35-cp35m-macosx_10_6_x86_64.whl這種形式實在是太麻煩了
python3 下載geogle圖片 google-images-download
google-images-download 下載圖片有限制 默認100 使用一下命令
googleimagesdownload -k "郝蕾" -l 200 --chromedriver="./chromedriver"
感謝春江慕客
https://www.bobobk.com/258.html
http://tech.ifeng.com/a/20180810/45113263_0.shtml googleimagesdownload的使用方法