忍者ブログ

[PR]

×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

Fatal error in launcher: Unable to create process using "" (English)

日本語記事はこちら
I could not run some pip commands...

・Caution

I am not professional, so what I will tell you may be incorrect. I recommend you to check what you read are really correct comparing with other sources (and if you find any mistakes, please tell me about it).

・Background

I was installing Python and pip to my desktop PC. First I installed Python3. After a short time, I realized that Python2 were also needed in my use, so I installed it.

Unfortunately, after that, some articles on the Internet says that if not install Python2 before installation of Python3, I cannot control Python version. (Perhaps, there are other ways.)

Therefore, I uninstalled Python2 and Python3 through Control Panel, and reinstalled in the order of Python2 and Python3. In this way, I succesed installation of them.

However, when I tried to run pip command via command prompt to make sure that installation was succeed, some pip command did not work and the following error message was shown.
  Fatal error in launcher: Unable to create process using "" ""  
This message was displayed when I use the command like
  pip "something"
If pip command work correctly, it is predicted that pip3 (pip of Python3) will run, but it didn't, though commands like
  py -m pip "something"
worked...

・Environment

Windows10 Pro
Python3.7.1
python2.7.15

・What I Did.

First, I made sure that the path was set correctly. If you have never checked the path, you should do that referencing other article.

Second, I checked the path in Python and I confirmed that "bad path" did not exited. (*1)
I heard there is a path in Python, but I do not know well about it.

Moreover, I tried to update pip using the command below.
        py -m pip install -U pip 
To my disappointment, it told me that the version of pip was latest.

Finally, I did reinstall Python further again and I did it  strictly. It solved the problem...
I uninstalled both Pythons and deleted all remaining files exited in the directory where Python were. In addition, I also deleted data related to pip which were in C:\Users\"UserName"\AppData\Local. After that, I install python2 followed by python3.

*1

I do not think that checking it has meaning, but I write how did I check it just in case.
Via command prompt, I started Python and typed the next codes.

        C:\******> python
       >>> import sys
       >>> sys.path

After that, some directories were shown and I checked them.

拍手[0回]

PR

Fatal error in launcher: Unable to create process using ""

The same article written in English is here.
pipの実行がうまくいかない

・症状

Pythonとpipのインストール時に、これらがうまくできたかを確認するため、コマンドプロンプトからそれぞれのコマンドを実行して確認していた。

だがpipコマンドの実行がうまくいかない。下記のようなエラーが出てしまうのだ。

  Fatal error in launcher: Unable to create process using "" ""  

これを解決したい。

・諸注意

素人が備忘録的に書いている記事です。必ずしも正しいわけではないので、鵜呑みにせずよく確認してください。

・環境

Windows10 Pro
Python3.7.1
python2.7.15

・背景

諸事情により、私は自宅のデスクトップパソコンへPythonを入れることになった。それもPython2とPython3の両方である。

はじめにPython3をいれた...のだが、ここでPython2を入れる必要があることに気が付く。そこでPython2を入れた。だがどうもネットで検索していると、先にPython2を入れ、そのあとPython3を入れないとうまくバージョン管理ができないらしい。(他にやりようはあるのかもしれないが。)
そこでそれぞれをコントロールパネルからアンインストール。Python2->Python3の順にインストールをし直したのだ。こうしてPython2とPython3はうまくインストールできたのである。だがpipコマンドの確認段階でつまずいてしまった。
  pip コマンド 
等の形で実行されるはずの、Python3のpipがうまく実行できないのである。
  py -m pip コマンド 
では実行できるのに...。

・解決まで

まず初めに、正しくPathが通っているかを調べ、問題がないことを確認した。人によってはこの段階で原因を発見できると思うが、詳しい説明は他のブログやサイトを参照してほしい。

次にPython内のPathである。存在するらしい。これを調べることに意味はなさそうだが、余計なところにPathが通っていないことを確認した。(注1)

またpipのアップデートも試みた。
  py -m pip install -U pip 
である。だが最新版であるという結果に。

そして最後にやったのがPython3の再インストールである。

まずPythonをアンインストールする。そして、もともとPythonがインストールされていたディレクトリ以下に残っているファイルを全て消去。さらにC:\Users\ユーザ名\AppData\Local以下にあるpipのデータも消去しておいた。その上でPythonを再度インストールするのである。私の場合はこれで解決した。

注1

これに関しては的外れだと思うが、一応私が確認した方法について。
まず Python でPythonを実行。 import sys と sys.path で出力されたディレクトリを確認した。

拍手[3回]