파 이 썬 기반 MacOS 에 robotframework-ride 설치
13980 단어 pythonmacrobotframeworkride
설치 하 다.
python 기반 이기 때문에 여러 운영 체제 에서 실행 할 수 있 습 니 다.여기 서 리드 의 맥 OS 사용 방식 을 소개 한다.
OS 버 전
MacOS 버 전:10.13.2
wxpython
RIDE 는 wxpython 기반 의 응용 이기 때문에 먼저 wxpython 이 설치 되 었 음 을 보증 해 야 합 니 다.설치 명령 은 다음 과 같 습 니 다:
설치 명령:brew install wxpython
설치 로그
liumiaocn:~ liumiao$ brew install wxpython
==> Installing dependencies for wxpython: gdbm, readline, sqlite, python@2, jpeg, libpng, libtiff, wxmac
==> Installing wxpython dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.15.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gdbm-1.15.high_sierra.bottle.tar.gz
? /usr/local/Cellar/gdbm/1.15: 19 files, 569.8KB
==> Installing wxpython dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.3_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring readline-7.0.3_1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include
==> Summary
? /usr/local/Cellar/readline/7.0.3_1: 46 files, 1.5MB
==> Installing wxpython dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.24.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring sqlite-3.24.0.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/sqlite/lib/pkgconfig
==> Summary
? /usr/local/Cellar/sqlite/3.24.0: 11 files, 3.5MB
==> Installing wxpython dependency: python@2
==> Downloading https://homebrew.bintray.com/bottles/[email protected]_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring [email protected]_1.high_sierra.bottle.tar.gz
==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-mana
==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-mana
==> /usr/local/Cellar/python@2/2.7.15_1/bin/python -s setup.py --no-user-cfg install --force --verbose --single-version-externally-mana
==> Caveats
Pip and setuptools have been installed. To update them
pip install --upgrade pip setuptools
You can install Python packages with
pip install <package>
They will install into the site-package directory
/usr/local/lib/python2.7/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
? /usr/local/Cellar/python@2/2.7.15_1: 4,673 files, 82.8MB
==> Installing wxpython dependency: jpeg
==> Downloading https://homebrew.bintray.com/bottles/jpeg-9c.high_sierra.bottle.tar.gz
curl: (6) Could not resolve host: akamai.bintray.com
Error: Failed to download resource "jpeg"
Download failed: https://homebrew.bintray.com/bottles/jpeg-9c.high_sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading http://www.ijg.org/files/jpegsrc.v9c.tar.gz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/jpeg/9c
==> make install
? /usr/local/Cellar/jpeg/9c: 21 files, 749.8KB, built in 33 seconds
==> Installing wxpython dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.34.high_sierra.bottle.tar.gz
curl: (6) Could not resolve host: akamai.bintray.com
Error: Failed to download resource "libpng"
Download failed: https://homebrew.bintray.com/bottles/libpng-1.6.34.high_sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://downloads.sourceforge.net/libpng/libpng-1.6.34.tar.xz
==> Downloading from https://downloads.sourceforge.net/project/libpng/libpng16/1.6.34/libpng-1.6.34.tar.xz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/libpng/1.6.34
==> make
==> make test
==> make install
? /usr/local/Cellar/libpng/1.6.34: 26 files, 1.2MB, built in 1 minute 38 seconds
==> Installing wxpython dependency: libtiff
==> Downloading https://homebrew.bintray.com/bottles/libtiff-4.0.9_3.high_sierra.bottle.tar.gz
curl: (6) Could not resolve host: akamai.bintray.com
Error: Failed to download resource "libtiff"
Download failed: https://homebrew.bintray.com/bottles/libtiff-4.0.9_3.high_sierra.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz
curl: (28) Resolving timed out after 5551 milliseconds
Trying a mirror...
==> Downloading https://fossies.org/linux/misc/tiff-4.0.9.tar.gz
######################### 34.8%
######################################################################## 100.0%
==> Downloading https://mirrors.ocf.berkeley.edu/debian/pool/main/t/tiff/tiff_4.0.9-5.debian.tar.xz
######################################################################## 100.0%
==> Patching
==> Applying patches/CVE-2017-9935.patch
patching file libtiff/tif_dir.c
patching file tools/tiff2pdf.c
==> Applying patches/CVE-2017-18013.patch
patching file libtiff/tif_print.c
==> Applying patches/CVE-2018-5784.patch
patching file contrib/addtiffo/tif_overview.c
patching file tools/tiff2pdf.c
patching file tools/tiffcrop.c
==> Applying patches/CVE-2017-11613_part1.patch
patching file libtiff/tif_dirread.c
==> Applying patches/CVE-2017-11613_part2.patch
patching file libtiff/tif_dirread.c
==> Applying patches/CVE-2018-7456.patch
patching file libtiff/tif_dirread.c
patching file libtiff/tif_print.c
==> Applying patches/CVE-2017-17095.patch
patching file tools/pal2rgb.c
==> ./configure --prefix=/usr/local/Cellar/libtiff/4.0.9_3 --without-x --with-jpeg-include-dir=/usr/local/opt/jpeg/include --with-jpeg-
==> make install
? /usr/local/Cellar/libtiff/4.0.9_3: 246 files, 3.5MB, built in 5 minutes 10 seconds
==> Installing wxpython dependency: wxmac
==> Downloading https://homebrew.bintray.com/bottles/wxmac-3.0.4.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wxmac-3.0.4.high_sierra.bottle.tar.gz
? /usr/local/Cellar/wxmac/3.0.4: 810 files, 23.7MB
==> Installing wxpython
==> Downloading https://homebrew.bintray.com/bottles/wxpython-3.0.2.0_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wxpython-3.0.2.0_1.high_sierra.bottle.tar.gz
? /usr/local/Cellar/wxpython/3.0.2.0_1: 1,108 files, 37.9MB
liumiaocn:~ liumiao$
버 전 확인
liumiaocn:~ liumiao$ brew info wxpython
wxpython: stable 3.0.2.0 (bottled)
Python bindings for wxWidgets
https://www.wxwidgets.org/
/usr/local/Cellar/wxpython/3.0.2.0_1 (1,115 files, 39.9MB) *
Poured from bottle on 2018-06-19 at 15:52:25
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/wxpython.rb
==> Dependencies
Required: python@2 ✔, wxmac ✔
liumiaocn:~ liumiao$
대응 1:wxpython 설치 후 현재 버 전 은 소프트 연결 이 없어 야 정상 적 인 동작 을 할 수 있 습 니 다.로그 에 따 르 면 이번에 설 치 된 wxpython 버 전 은 wxpython-3.0.2.0 입 니 다.1.다음 작업 에 따라 소프트 연결 을 만 들 면 됩 니 다.링크 만 들 기
liumiaocn:bin liumiao$ pwd
/usr/local/bin
liumiaocn:bin liumiao$ ls wx
ls: wx: No such file or directory
liumiaocn:bin liumiao$ ln -s ../Cellar/wxpython/3.0.2.0_1/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx wx
liumiaocn:bin liumiao$
확인 방식
liumiaocn:~ liumiao$ python -c "import wx; print wx.VERSION"
/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py:16633: UserWarning: wxPython/wxWidgets release number mismatch
warnings.warn("wxPython/wxWidgets release number mismatch")
(3, 0, 2, 0, '')
liumiaocn:~ liumiao$
여전히 warning 메 시 지 를 알려 주지 만 정상적으로 동작 을 계속 할 수 있 습 니 다.robotframework-ride 설치
pip 를 사용 하여 robotframework-ride 를 설치 합 니 다.설치 명령 은 다음 과 같 습 니 다.
설치 명령:pip install robotframework-ride
시작 확인
ride.py 를 통 해 RIDE 를 시작 합 니 다.현재 버 전에 서 다음 과 같은 오류 정보 가 발생 했 습 니 다.
liumiaocn:bin liumiao$ ride.py
Wrong wxPython version.
You need to install wxPython 2.8.12.1 with unicode support to run RIDE.
wxPython 2.8.12.1 can be downloaded from http://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/
liumiaocn:bin liumiao$
원인 확인:위치 추적 코드 에서 오류 가 발생 한 위 치 를 통 해 다음 파일 을 확인 합 니 다.
liumiaocn:local liumiao$ find . -name '*.py' |xargs grep 'You need to install wxPython'
./lib/python2.7/site-packages/robotide/__init__.py:You need to install wxPython 2.8.12.1 with unicode support to run RIDE.
liumiaocn:local liumiao$ view ./lib/python2.7/site-packages/robotide/__init__.py
liumiaocn:local liumiao$ grep supported_versions ./lib/python2.7/site-packages/robotide/__init__.py
supported_versions = ["2.8"]
supported_versions.append("2.9")
wxversion.select(supported_versions)
liumiaocn:local liumiao$
대응 방법 1:지원 하 는 버 전 번 호 를 현재 버 전 으로 직접 변경
liumiaocn:~ liumiao$ diff /usr/local/lib/python2.7/site-packages/robotide/__init__.py /usr/local/lib/python2.7/site-packages/robotide/__init__.py.org
37,38c37
< #supported_versions = ["2.8"]
< supported_versions = ["3.0.2.0"]
---
> supported_versions = ["2.8"]
liumiaocn:~ liumiao$
대응 방법 2:슈퍼 ported 추가versions
liumiaocn:~ liumiao$ diff /usr/local/lib/python2.7/site-packages/robotide/__init__.py /usr/local/lib/python2.7/site-packages/robotide/__init__.py.org
44d43
< supported_versions.append("3.0.2.0")
liumiaocn:~ liumiao$
실제 다음 줄 에 현재 버 전에 대한 지원 을 추가 하 였 습 니 다.
try:
import wxversion
from wxversion import VersionError
if sys.platform == 'darwin':
supported_versions.append("2.9")
supported_versions.append("3.0.2.0")
wxversion.select(supported_versions)
import wx
로봇 프레임 워 크 설치pip install robotramework 를 사용 하여 robotframework 를 설치 합 니 다.
liumiaocn:~ liumiao$ pip install robotframework
Collecting robotframework
Downloading https://files.pythonhosted.org/packages/95/b1/4faa12e1950b9fbd00060c112fa6f828c4f3998e9b2f8c570c22db10bc88/robotframework-3.0.4.tar.gz (443kB)
100% || 450kB 34kB/s
Building wheels for collected packages: robotframework
Running setup.py bdist_wheel for robotframework ... done
Stored in directory: /Users/liumiao/Library/Caches/pip/wheels/8a/01/4a/fd9aef57cca0087d0bd5ceba5db39247ef375fdc4df5ebfb59
Successfully built robotframework
Installing collected packages: robotframework
Successfully installed robotframework-3.0.4
liumiaocn:~ liumiao$
시작 RIDE명령 행 에 ride.py 를 입력 하고 차 로 돌아 가면 RIDE 를 시작 할 수 있 습 니 다.
pygments 설치
Text Edit 의 tab 알림 은 하 이 라이트 디 스 플레이 용 패키지 pygments 를 설치 해 야 합 니 다.
pip install pygments 로 설치 하기
liumiaocn:~ liumiao$ pip install pygments
Collecting pygments
Downloading https://files.pythonhosted.org/packages/02/ee/b6e02dc6529e82b75bb06823ff7d005b141037cb1416b10c6f00fc419dca/Pygments-2.2.0-py2.py3-none-any.whl (841kB)
100% || 849kB 1.9MB/s
Installing collected packages: pygments
Successfully installed pygments-2.2.0
liumiaocn:~ liumiao$
ride.py 를 다시 시작 하면 정상 동작 을 할 수 있 습 니 다.총결산
이상 은 이 글 의 모든 내용 입 니 다.본 고의 내용 이 여러분 의 학습 이나 업무 에 어느 정도 참고 학습 가 치 를 가지 기 를 바 랍 니 다.여러분 의 저희 에 대한 지지 에 감 사 드 립 니 다.더 많은 내용 을 알 고 싶다 면 아래 링크 를 보 세 요.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
로마 숫자를 정수로 또는 그 반대로 변환그 중 하나는 로마 숫자를 정수로 변환하는 함수를 만드는 것이었고 두 번째는 그 반대를 수행하는 함수를 만드는 것이었습니다. 문자만 포함합니다'I', 'V', 'X', 'L', 'C', 'D', 'M' ; 문자열이 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.