0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Python3.6:cx_FreezeでPhantomJSのコンソールが表示されてしまう

Posted at

2017-03-05 17:01:04

version:Python3.6

cx_FreezeでPythonをexe化した所、exeファイルを実行する時だけPhantomJSのコンソールが表示されてしまう。何かかっこわるい。。
下記を参考にseleniumのservice.pyを入れ替える。
(Pythonインストールフォルダ)\Lib\site-packages\selenium\webdriver\common

GitHub
https://github.com/Lazik/selenium/blob/d790915a1124bd4730f10855c7e0a40ab6e6b59f/py/selenium/webdriver/common/service.py

しかし、下記のエラーが出てexe化が失敗するようになってしまった。
win32process not found

win32processが何かを調べた所、
pywin32をインストールすれば解決できそうな感じ

https://sourceforge.net/projects/pywin32/files/pywin32/
こちらから自分の環境にあったものをインストール。

しかし自分の環境では下記のエラーでインストールが途中で止まってしまった。。
Python version3.6 required which was not found in the registry

pywin32のインストーラが自分のPython3.6を認識できない。。

Windowsインストーラーからインストールしたのでレジストリ自体は間違いないはず。。

試しに、若干対処療法的になってしまうが
HKEY_CURRENT_USER\Software\Python\PythonCore\3.6-32
となっていたのを「-32」の部分を消して
HKEY_CURRENT_USER\Software\Python\PythonCore\3.6
としたら無事インストールできた。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?