1. 程式人生 > >python---pytessercat圖片驗證碼,kali linux,Pillow,pytessercat,tesserocr的安裝

python---pytessercat圖片驗證碼,kali linux,Pillow,pytessercat,tesserocr的安裝

tesseract.pc' to the PKG_CONFIG_PATH environment variable No package 'tesseract' found Supporting tesseract v3.02 Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 770}} Couldn't find index page for 'Cython' (maybe misspelled?) No local packages or download links found for
Cython>=0.23 Traceback (most recent call last): File "setup.py", line 184, in <module> setup_requires=['Cython>=0.23'], File "/usr/lib/python2.7/distutils/core.py", line 112, in setup _setup_distribution = dist = klass(attrs) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 221
, in __init__ self.fetch_build_eggs(attrs.pop('setup_requires')) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 245, in fetch_build_eggs parse_requirements(requires), installer=self.fetch_build_egg File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 576, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/usr/lib/python2.7/dist-packages/pkg_resources.py"
, line 821, in best_match return self.obtain(req, installer) # try and download/install File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 833, in obtain return installer(requirement) File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 294, in fetch_build_egg return cmd.easy_install(req) File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 602, in easy_install raise DistutilsError(msg) distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('Cython>=0.23') [email protected]:/usr/share/tesserocr# 第一個錯誤:tesseract_ocr.cpp:507:34: fatal error: leptonica/allheaders.h: No such file or directory compilation terminated. 解決辦法:sudo apt install libleptonica-dev 第二個錯誤:tesseract_ocr.cpp:508:31: fatal error: tesseract/baseapi.h: No such file or directory compilation terminated. 解決辦法:sudo apt install libtesseract-dev 第四步:安裝TesseractTrainer(可選用於機器學習圖片生產規則) [email protected]:/usr/share# git clone https://github.com/HarshUpadhyay/TesseractTrainer.git 正克隆到 'TesseractTrainer'... remote: Counting objects: 421, done. Receiving objects: 100% (421/421), 98.46 KiB | 38 KiB/s, done. remote: Total 421 (delta 0), reused 0 (delta 0), pack-reused 421 Resolving deltas: 100% (225/225), done. [email protected]:/usr/share# cd TesseractTrainer/ [email protected]:/usr/share/TesseractTrainer# ls LICENSE.txt MANIFEST.in README.md README.txt setup.py tesseract_trainer WHATCHANGED.md [email protected]:/usr/share/TesseractTrainer# python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files running bdist_egg running egg_info creating TesseractTrainer.egg-info writing requirements to TesseractTrainer.egg-info/requires.txt writing TesseractTrainer.egg-info/PKG-INFO writing top-level names to TesseractTrainer.egg-info/top_level.txt writing dependency_links to TesseractTrainer.egg-info/dependency_links.txt writing manifest file 'TesseractTrainer.egg-info/SOURCES.txt' reading manifest file 'TesseractTrainer.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'TesseractTrainer.egg-info/SOURCES.txt' installing library code to build/bdist.linux-i686/egg running install_lib running build_py creating build creating build/lib.linux-i686-2.7 creating build/lib.linux-i686-2.7/tesseract_trainer copying tesseract_trainer/multipage_tif.py -> build/lib.linux-i686-2.7/tesseract_trainer copying tesseract_trainer/__init__.py -> build/lib.linux-i686-2.7/tesseract_trainer creating build/bdist.linux-i686 creating build/bdist.linux-i686/egg creating build/bdist.linux-i686/egg/tesseract_trainer copying build/lib.linux-i686-2.7/tesseract_trainer/multipage_tif.py -> build/bdist.linux-i686/egg/tesseract_trainer copying build/lib.linux-i686-2.7/tesseract_trainer/__init__.py -> build/bdist.linux-i686/egg/tesseract_trainer byte-compiling build/bdist.linux-i686/egg/tesseract_trainer/multipage_tif.py to multipage_tif.pyc byte-compiling build/bdist.linux-i686/egg/tesseract_trainer/__init__.py to __init__.pyc creating build/bdist.linux-i686/egg/EGG-INFO installing scripts to build/bdist.linux-i686/egg/EGG-INFO/scripts running install_scripts running build_scripts creating build/scripts-2.7 copying and adjusting tesseract_trainer/tesstrain -> build/scripts-2.7 changing mode of build/scripts-2.7/tesstrain from 644 to 755 creating build/bdist.linux-i686/egg/EGG-INFO/scripts copying build/scripts-2.7/tesstrain -> build/bdist.linux-i686/egg/EGG-INFO/scripts changing mode of build/bdist.linux-i686/egg/EGG-INFO/scripts/tesstrain to 755 copying TesseractTrainer.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO copying TesseractTrainer.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TesseractTrainer.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TesseractTrainer.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO copying TesseractTrainer.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/TesseractTrainer-0.1-py2.7.egg' and adding 'build/bdist.linux-i686/egg' to it removing 'build/bdist.linux-i686/egg' (and everything under it) Processing TesseractTrainer-0.1-py2.7.egg creating /usr/local/lib/python2.7/dist-packages/TesseractTrainer-0.1-py2.7.egg Extracting TesseractTrainer-0.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages Adding TesseractTrainer 0.1 to easy-install.pth file Installing tesstrain script to /usr/local/bin Installed /usr/local/lib/python2.7/dist-packages/TesseractTrainer-0.1-py2.7.egg Processing dependencies for TesseractTrainer==0.1 Searching for Pillow==4.4.0.dev0 Best match: Pillow 4.4.0.dev0 Processing Pillow-4.4.0.dev0-py2.7-linux-i686.egg Pillow 4.4.0.dev0 is already the active version in easy-install.pth Installing viewer.py script to /usr/local/bin Installing player.py script to /usr/local/bin Installing explode.py script to /usr/local/bin Installing painter.py script to /usr/local/bin Installing pildriver.py script to /usr/local/bin Installing pilfont.py script to /usr/local/bin Installing pilprint.py script to /usr/local/bin Installing gifmaker.py script to /usr/local/bin Installing pilfile.py script to /usr/local/bin Installing pilconvert.py script to /usr/local/bin Installing enhancer.py script to /usr/local/bin Installing thresholder.py script to /usr/local/bin Using /usr/local/lib/python2.7/dist-packages/Pillow-4.4.0.dev0-py2.7-linux-i686.egg Finished processing dependencies for TesseractTrainer==0.1 [email protected]:/usr/share/TesseractTrainer# cd . [email protected]:/usr/share/TesseractTrainer#

相關推薦

python---pytessercat圖片驗證,kali linux,Pillow,pytessercat,tesserocr安裝

tesseract.pc' to the PKG_CONFIG_PATH environment variable No package 'tesseract' found Supporting tesseract v3.02 Building with configs: {'libraries': ['t

python實現圖片驗證

stat 模塊 app req param div pytho python ram 1 驗證基礎知識1.1 Python生成隨機驗證碼,需要使用PIL模塊. # 安裝 pip3 install pillow 1.2 創建圖片 from PIL import Imag

python獲取圖片驗證

tor bsp mman imp directory roc nic pytho 取圖 一、安裝linux下圖片處理工具: # which tesseract/usr/bin/tesseract 二、安裝python連接模塊: pip install pytesseract

python生成圖片驗證

per ont 字符 ESS ext ttf 隨機 dom ice import PIL from PIL import Image from PIL import ImageDraw,ImageFont import random def get_r

python生成圖片驗證程式碼

from PIL import Image, ImageDraw, ImageFont import random import string #所有可能的字元,主要是英文字母和數字 characters = string.ascii_letters+string.digits #

Python生成圖片驗證

用Python生成圖片驗證碼, Python版本:Python3.6 程式碼如下: # -*-coding:utf-8 -*- from PIL import Image, ImageDraw, ImageFont, ImageFilter import random import

Python 實現簡單圖片驗證登錄

需要 spa tps dem 圖片背景 round alt word exc 朋友說公司要在測試環境做接口測試,登錄時需要傳入正確的圖片的驗證碼,本著懶省事的原則,推薦他把測試環境的圖片驗證碼寫死,我們公司也是這麽做的^_^。勸說無果/(ㄒoㄒ)/~~,只能通過 OCR 技

python第一百一十八天---ajax--圖片驗證 + Session

console lte 狀態 狀態碼 創建 ins .py 上層 成功 原生AJAX   Ajax主要就是使用 【XmlHttpRequest】對象來完成請求的操作,該對象在主流瀏覽器中均存在(除早起的IE),Ajax首次出現IE5.5中存在(ActiveX控件)。 1、X

Python #圖片驗證

測試 imp ase 使用 color blog pre ati install //測試環境 Python 2.7 安裝 pip install graphic-verification-code 使用 import gvcode img,code=gvcode.

dotnet core Linux圖片驗證解決方案

https tps 3.0 驗證碼 code 地址 hub 圖片 dot 方案來源:https://github.com/zkweb-framework/zkweb.system.drawing 百度大多都是安裝libgdiplus方法 不說了 然後驗證碼亂碼問題在上面地址

Python 實現識別弱圖片驗證

data- info clas 明顯 standard 滑動驗證 管理工具 named 實驗室 目前,很多網站為了防止爬蟲肆意模擬瀏覽器登錄,采用增加驗證碼的方式來攔截爬蟲。驗證碼的形式有多種,最常見的就是圖片驗證碼。其他驗證碼的形式有音頻驗證碼,滑動驗證碼等。圖片驗證碼

Linux伺服器 java生成的圖片驗證亂碼問題

問題:如圖所示專案中生成的圖形驗證碼不能正常顯示出需要的字型 原因:  linux下沒有對應的字型 查詢專案中使用到系統字型的地方,如下: 解決: 1. 在本地 路徑 C:\Windows\Fonts 下找到需要的字型 (Times New Ro

linux (CentOS)安裝python-tesseract 用於驗證識別

python-tesseract 是 tesseract的python封裝庫,能夠用於驗證碼的識別。尤其是可以通過更改識別庫的名稱達到使用自己訓練出來的庫的目的,尤為方便。關於如何訓練tesseract-ocr 的識別庫見 我的另一篇博文。 下面是官方版安裝python

Python 批量下載驗證圖片及切割驗證圖片,識別驗證,並以識別的文字重命令驗證

1、Python 批量下載驗證碼圖片 2、批量切割驗證碼圖片 3、識別驗證碼,並以識別的文字重命令驗證碼 #!C:/Python27 #coding=utf-8 import pytesseract from pytesser import * from PIL imp

python爬蟲實現登陸簡單圖片驗證識別(Tesseract識別)

Tesseract下載與安裝 附:德國曼海姆大學發行的3.05版本下載 安裝與配置PATH環境變數 安裝略,環境變數只要將目錄新增到PATH路徑,PATH路徑針對於命令列解析。 tesseract 1.png output-l eng -psm 7 -ps

字元型圖片驗證識別完整過程及Python實現

1111000111111000111111100001111100000011 1110111011110111011111011110111100110111 1001110011110111101011011010101101110111 110111111111011010111111010

python生成隨機圖片驗證

from PIL import Image,ImageDraw,ImageFont,ImageFilter import random import string chars=string.digits+string.ascii_letters chars=random.s

python 圖片驗證去噪 識別

二值化處理(圖片預設在C:\Python27\Scripts資料夾下,可根據自己需求更改)原圖:from PIL import Image # 二值化處理 def two_value(): # 開啟資料夾中的圖片 im

Python爬取圖片驗證

# -*- coding:utf-8 -*-import requestsfrom bs4 import BeautifulSoupheader = {  'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWeb

Python破解12306圖片驗證

不知從何時起,12306的登入驗證碼竟然變成了按字找圖,可以說是又提高了一個等次,竟然把影象識別都用上了。不過有些圖片,不得不說有些變態,圖片的清晰圖就更別說了,明顯是從網路上的相簿中搬過來的。 誰知沒多久,網路就驚現破解12306圖片驗證碼的Python程式碼了,