質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

13304閲覧

Python - wxPython のインストールができない

HaruruYaki

総合スコア16

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

1クリップ

投稿2020/11/19 11:48

###実現したいこと
今までPython3.8を利用してました。
新しいPython3.9がリリースされたということで、インストールしました。
新しい方でwxPythonをインストールしようとしたら、以下のような長いエラーが出てきました。

ネットを見てもなかなか解決できないので回答お願いします。

C:\users[名前]>pip install wxPython --user Collecting wxPython Using cached wxPython-4.1.0.tar.gz (65.8 MB) Requirement already satisfied: pillow in c:\users[名前]\appdata\local\programs\python\python39\lib\site-packages (from wxPython) (8.0.1) Requirement already satisfied: six in c:\users[名前]\appdata\local\programs\python\python39\lib\site-packages (from wxPython) (1.15.0) Requirement already satisfied: numpy in c:\users[名前]\appdata\local\programs\python\python39\lib\site-packages (from wxPython) (1.19.4) Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed. Installing collected packages: wxPython Running setup.py install for wxPython ... error ERROR: Command errored out with exit status 1: command: 'C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\[名前]\AppData\Local\Temp\pip-install-5h8598fb\wxpython\setup.py'"'"'; __file__='"'"'C:\Users\[名前]\AppData\Local\Temp\pip-install-5h8598fb\wxpython\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users[名前]\AppData\Local\Temp\pip-record-a0stxcs9\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users[名前]\AppData\Roaming\Python\Python39\Include\wxPython' cwd: C:\Users[名前]\AppData\Local\Temp\pip-install-5h8598fb\wxpython\ Complete output (33 lines): running install running build Will build using: "C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe" 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] Python's architecture is 64bit cfg.VERSION: 4.1.0 Running command: build Running command: build_wx Command '"C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe" -c "import setuptools, distutils.msvc9compiler as msvc; mc = msvc.MSVCCompiler(); mc.initialize(); print(mc.cc)"' failed with exit code 1. Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users[名前]\AppData\Local\Programs\Python\Python39\lib\distutils\msvc9compiler.py", line 371, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Users[名前]\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\msvc.py", line 140, in msvc9_query_vcvarsall return EnvironmentInfo(arch, ver).return_env() File "C:\Users[名前]\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\msvc.py", line 1742, in return_env [self.VCIncludes, File "C:\Users[名前]\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\msvc.py", line 1284, in VCIncludes return [join(self.si.VCInstallDir, 'Include'), File "C:\Users[名前]\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\msvc.py", line 842, in VCInstallDir raise distutils.errors.DistutilsPlatformError(msg) distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.2 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ Finished command: build_wx (0.344s) Finished command: build (0.344s) WARNING: Building this way assumes that all generated files have been generated already. If that is not the case then use build.py directly to generate the source and perform the build stage. You can use --skip-build with the bdist_* or install commands to avoid this message and the wxWidgets and Phoenix build steps in the future. "C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe" -u build.py build Command '"C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe" -u build.py build' failed with exit code 1. ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users[名前]\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\[名前]\AppData\Local\Temp\pip-install-5h8598fb\wxpython\setup.py'"'"'; __file__='"'"'C:\Users\[名前]\AppData\Local\Temp\pip-install-5h8598fb\wxpython\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users[名前]\AppData\Local\Temp\pip-record-a0stxcs9\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users[名前]\AppData\Roaming\Python\Python39\Include\wxPython' Check the logs for full command output.

###環境
Windows10
64bit
Python 3.9

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

pip でインストールされるのは、pypi
https://pypi.org/project/wxPython/#files

からダウンロードされるファイル一覧がありますが、、
python3.9 に対応するバイナリ (py39) はありません。

wxPythonのサイトも現在の最新リリースは、
wxPython 4.1.0 Released The wxPython Team 2020-04-24 00:00
なので、python3.9 の前見たいですね。

Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.

wheel がインストールされてないので、
ソースコードをダウンロードして独自にビルドしようとしてます。
この場合は、別途 wxWidgets (wxPython が利用するライブラリ) 等の開発環境が必要です。


Python3.9用のバイナリは、安定板ではありませんが
開発版のスナップショットが公開されてます。

https://wxpython.org/Phoenix/snapshot-builds/

  • pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython==4.1.1a1.dev5063+1d243a37

※ pip を使ってのインストール方法は URL 内の README に記載。
※ バージョンの指定部分は、上記URLから確認。

他にも anaconda 用等、別のディストリビューション用のパッケージは
用意されてることも有るかもしれません。

投稿2020/11/21 13:10

teamikl

総合スコア8664

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

HaruruYaki

2020/11/21 20:39

お!インストールできました!新しいバージョンのなので、なかなかサイトがなかったので困っていました。 回答ありがとうございます^^
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問