原创 Pycharm工程下無法調用同一目錄下py文件的解決方案

1、檢查py文件名是否包含空格,務必將空格去掉 2、由於Pycharm不會自動將當前文件目錄加入sourse_path,手動添加 右鍵py文件所在目錄,在make_directory as選中sources path即可  

原创 安裝opencc包後出現錯誤:OSError: dlopen(libopencc.so.1, 6): image not found

將pip install opencc 改成 pip install opencc-python-reimplemented==0.1.4 即可

原创 ImportError: No module named setuptools兩種解決方法

1、使用命令安裝 Python 2.x sudo apt-get install python-setuptools  Python 3.x sudo apt-get install python3-setuptools 可能出現的錯

原创 jupyter notebook啓動失敗:xxx not found、ImportError: No module named xxx

問題現象 前置操作:啓動jupyter notebook 報錯內容:xxx not found、ImportError: No module named xxx 分析原因 併發框架pyzmq多版本衝突 解決方法(以conda爲例) 卸載、

原创 使用FFmpeg壓縮視頻

需求分析 視頻過大,不方便存儲 很多時候,高幀率、高碼率是僞需求 視頻幀率、音頻碼率的適當程度壓縮對視頻整體質量的影響有限 實現工具 ffmpeg(安裝教程參加我的另一篇博客) 實現過程 打開終端,輸入以下命令 ffmpeg -i [v

原创 一行代碼暢遊各大視頻網站

需求 已知視頻地址,下載視頻至本地 工具 python3 ffmpeg you-get 工具的安裝(以macOS爲例) 安裝python3(略) 安裝ffmpeg(參見我的另一篇教程) 使用pip3安裝you-get pip3 inst

原创 MacOS下安裝brew時報錯port 443: Connection refused的解決方案(最全)

方案一、重裝command line tools removing the old tools ($ rm -rf /Library/Developer/CommandLineTools) install xcode command li

原创 Anaconda創建環境失敗CondaHTTPError: HTTP 000 CONNECTION FAILED for url

1、在命令行中爲anaconda添加清華鏡像 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ conda con

原创 pip使用清華鏡像方法

1、臨時方法 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package   2、設爲默認 升級 pip 到最新的版本 (>=10.0.0) 後進行配置:

原创 在python2.x下安裝PyQt5(親測可用)

1、安裝brew  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2、安裝qt5 brew ins

原创 Homebrew使用清華鏡像與復原

1、替換現有上游  git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git gi

原创 macOS中brew的安裝與使用

一、什麼是brew? brew 全稱Homebrew,是Mac OSX上的軟件包管理工具   二、brew的安裝 官網:https://brew.sh/index_zh-cn.html 我們打開命令行,輸入以下內容 /usr/bin/r

原创 使用FFmpeg提取視頻中的音頻

一、安裝FFmpeg     參見我的另一篇博客《MacOS下通過homebrew安裝FFmpeg》。   二、提取視頻中的音頻 ffmpeg -i video_name -vn output_name video_name    

原创 使用FFmpeg剪切視頻

一、安裝FFmpeg     參見我的另一篇博客《MacOS下通過homebrew安裝FFmpeg》。 二、剪切視頻 ffmpeg -ss 00:00:15 -t 00:00:05 -i video_name output_name

原创 PyQt安裝錯誤incompatible licenses解決辦法(親測有效)

對configure.py文件進行修改 將第2590行之後的以下三行代碼註釋掉即可 #if introspecting and target_config.qt_licensee not in OPEN_SOURCE_LICENSEES