日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

离线安装wxpython4.0.6_离线安装wxpython

發布時間:2024/1/1 python 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 离线安装wxpython4.0.6_离线安装wxpython 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

離線安裝wxpython

前言

由于工作環境,我的工作機是在離線環境下的,沒法連接外網。但是自己又想學習一下wxpython,只好自己手動離線安裝,本來以為很簡單的,但是實際上。。。一言難盡。

基本環境:python pip easy_install

安裝python2.7

直接下載msi數據包安裝,如果無法識別安裝,那么:

1、確定msi數據包的完整性,包括大小、格式;

2、確定開啟開啟windows installer:win + R --> 輸入Services.msc --> 找到windows installer --> 左側手動啟用

python3.X 安裝更為簡單,直接雙擊.exe文件安裝即可,且都需要選定添加環境變量。

安裝wxpython

1、下載

下載地址:https://pypi.org/project/wxPython/4.0.1/#files

選擇對應的文件進行安裝,我的選擇是: wxPython-4.0.1-cp27-cp27m-win_amd64.whl

其中:

cp27 表示 python2.7

win_amd64 表示 windows 64位

在這之外:win32 表示 32位 。

2、安裝

將下載好的wxpython**.whl文件轉移到python安裝路徑下的Scripts目錄下,我的是:C:\Python27\Scripts

然后打開cmd或者powershell,切換到該目錄下:

PS C:\User\Yanta> cd C:\Python27\Scripts

執行命令 pip install wxPython-4.0.1-cp27-cp27m-win_amd64.whl ,此時會報錯:wxPython-4.0.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform. 。

PS C:\Python27\Scripts> pip install .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl

wxPython-4.0.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.

此時可以嘗試使用easy_install安裝,結果提示缺少 six 包。

PS C:\Python27\Scripts> .\easy_install-2.7.exe .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl

Processing wxPython-4.0.1-cp27-cp27m-win_amd64.whl

c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable ‘Py_DEBUG‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable ‘WITH_PYMALLOC‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable ‘Py_UNICODE_SIZE‘ is unset, Python ABI tag may be incorrect

sys.version_info < (3, 3))) Installing wxPython-4.0.1-cp27-cp27m-win_amd64.whl to c:\python27\lib\site-packages

writing requirements to c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg\EGG-INFO\requires.txt

Adding wxPython 4.0.1 to easy-install.pth file

Installing wxdemo-script.py script to c:\python27\Scripts

Installing wxdemo.exe script to c:\python27\Scripts

Installing img2png-script.py script to c:\python27\Scripts

Installing img2png.exe script to c:\python27\Scripts

Installing pyslices-script.py script to c:\python27\Scripts

Installing pyslices.exe script to c:\python27\Scripts

Installing img2py-script.py script to c:\python27\Scripts

Installing img2py.exe script to c:\python27\Scripts

Installing pyslicesshell-script.py script to c:\python27\Scripts

Installing pyslicesshell.exe script to c:\python27\Scripts

Installing wxget-script.py script to c:\python27\Scripts

Installing wxget.exe script to c:\python27\Scripts

Installing helpviewer-script.py script to c:\python27\Scripts

Installing helpviewer.exe script to c:\python27\Scripts

Installing pyshell-script.py script to c:\python27\Scripts

Installing pyshell.exe script to c:\python27\Scripts

Installing pycrust-script.py script to c:\python27\Scripts

Installing pycrust.exe script to c:\python27\Scripts

Installing wxdocs-script.py script to c:\python27\Scripts

Installing wxdocs.exe script to c:\python27\Scripts

Installing pywxrc-script.py script to c:\python27\Scripts

Installing pywxrc.exe script to c:\python27\Scripts

Installing img2xpm-script.py script to c:\python27\Scripts

Installing img2xpm.exe script to c:\python27\Scripts

Installed c:\python27\lib\site-packages\wxpython-4.0.1-py2.7-win-amd64.egg

Processing dependencies for wxPython==4.0.1

Searching for six

Reading https://pypi.python.org/simple/six/

Download error on https://pypi.python.org/simple/six/: [Errno 11004] getaddrinfo failed -- Some packages may not be found!

Couldn‘t find index page for ‘six‘ (maybe misspelled?)

Scanning index of all packages (this may take a while)

Reading https://pypi.python.org/simple/

Download error on https://pypi.python.org/simple/: [Errno 11004] getaddrinfo failed -- Some packages may not be found!

No local packages or working download links found for six

error: Could not find suitable distribution for Requirement.parse(‘six‘)

然后安裝 six ,下載地址:https://pypi.org/project/six/#files

選擇 six-1.11.0-py2.py3-none-any.whl ,一樣拷貝到C:\Python27\Scripts下,使用pip安裝:

PS C:\Python27\Scripts> .\easy_install-2.7.exe .\six-1.11.0-py2.py3-none-any.whl

Processing six-1.11.0-py2.py3-none-any.whl

c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable ‘Py_DEBUG‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable ‘WITH_PYMALLOC‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable ‘Py_UNICODE_SIZE‘ is unset, Python ABI tag may be incorrect

sys.version_info < (3, 3))) Installing six-1.11.0-py2.py3-none-any.whl to c:\python27\lib\site-packages

Adding six 1.11.0 to easy-install.pth file

Installed c:\python27\lib\site-packages\six-1.11.0-py2.7.egg

Processing dependencies for six==1.11.0

Finished processing dependencies for six==1.11.0

此時再次使用easy_install安裝wxpython即可:

PS C:\Python27\Scripts> .\easy_install-2.7.exe .\wxPython-4.0.1-cp27-cp27m-win_amd64.whl

Processing wxPython-4.0.1-cp27-cp27m-win_amd64.whl

c:\python27\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable ‘Py_DEBUG‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable ‘WITH_PYMALLOC‘ is unset, Python ABI tag may be incorrect

warn=(impl == ‘cp‘)):

c:\python27\lib\site-packages\setuptools\pep425tags.py:99: RuntimeWarning: Config variable ‘Py_UNICODE_SIZE‘ is unset, Python ABI tag may be incorrect

sys.version_info < (3, 3))) removing ‘c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg‘ (and everything under it)

Installing wxPython-4.0.1-cp27-cp27m-win_amd64.whl to c:\python27\lib\site-packages

writing requirements to c:\python27\lib\site-packages\wxPython-4.0.1-py2.7-win-amd64.egg\EGG-INFO\requires.txt

wxPython 4.0.1 is already the active version in easy-install.pth

Installing wxdemo-script.py script to c:\python27\Scripts

Installing wxdemo.exe script to c:\python27\Scripts

Installing img2png-script.py script to c:\python27\Scripts

Installing img2png.exe script to c:\python27\Scripts

Installing pyslices-script.py script to c:\python27\Scripts

Installing pyslices.exe script to c:\python27\Scripts

Installing img2py-script.py script to c:\python27\Scripts

Installing img2py.exe script to c:\python27\Scripts

Installing pyslicesshell-script.py script to c:\python27\Scripts

Installing pyslicesshell.exe script to c:\python27\Scripts

Installing wxget-script.py script to c:\python27\Scripts

Installing wxget.exe script to c:\python27\Scripts

Installing helpviewer-script.py script to c:\python27\Scripts

Installing helpviewer.exe script to c:\python27\Scripts

Installing pyshell-script.py script to c:\python27\Scripts

Installing pyshell.exe script to c:\python27\Scripts

Installing pycrust-script.py script to c:\python27\Scripts

Installing pycrust.exe script to c:\python27\Scripts

Installing wxdocs-script.py script to c:\python27\Scripts

Installing wxdocs.exe script to c:\python27\Scripts

Installing pywxrc-script.py script to c:\python27\Scripts

Installing pywxrc.exe script to c:\python27\Scripts

Installing img2xpm-script.py script to c:\python27\Scripts

Installing img2xpm.exe script to c:\python27\Scripts

Installed c:\python27\lib\site-packages\wxpython-4.0.1-py2.7-win-amd64.egg

Processing dependencies for wxPython==4.0.1

Finished processing dependencies for wxPython==4.0.1

3、測試

安裝過后測試一下,是否可以導入wx包:

PS C:\Python27\Scripts> py -2

Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import wx

4、NOTE

本機安裝有python2.7和3.6兩個版本,使用py -2 和py -3分別指向2.7和3.6,在python腳本中使用:

#!/user/bin/env python2

#!/user/bin/env python3

分別指定即可。

原文:https://www.cnblogs.com/iskylite/p/9084847.html

總結

以上是生活随笔為你收集整理的离线安装wxpython4.0.6_离线安装wxpython的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。