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

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

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

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

Q&A

解決済

1回答

392閲覧

django プロジェクトへ Seleniumなどの インストールエラー

e_nasu

総合スコア11

Django

DjangoはPythonで書かれた、オープンソースウェブアプリケーションのフレームワークです。複雑なデータベースを扱うウェブサイトを開発する際に必要な労力を減らす為にデザインされました。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

0グッド

0クリップ

投稿2019/11/07 00:40

前提・実現したいこと

初心者です。よろしくお願いします。
google corab 上で動いるものを webアプリケーションにして他のユーザが使えるようにしたいと考えており、pipenv の仮想環境にdjangoプロジェクトを作成しています。

その中にSelenium 等をインストールしたいのですが 下記のエラーが出てしまいます。

Selenium のほか retry bs4 pandas どれも同様のエラーが出てインストールできません。

環境
windows pro 10 64bit
pipenv version 2018.11.26
python 3.7.5
django 2.2.7
selenium 3.141.0
vscode

発生している問題・エラーメッセージ

エラーメッセージ PS C:\Users\hoge\hoge> pipenv install selenium Installing selenium… Adding selenium to Pipfile's [packages]… Installation Succeeded Pipfile.lock (8fb07c) out of date, updating to (4f9dd2)… Locking [dev-packages] dependencies… Locking [packages] dependencies… Success! Updated Pipfile.lock (8fb07c)! Installing dependencies from Pipfile.lock (8fb07c)… An error occurred while installing django==2.2.7 --hash=sha256:16040e1288c6c9f68c6da2fe75ebde83c0a158f6f5d54f4c5177b0c1478c5b86 --hash=sha256:89c2007ca4fa5b351a51a279eccff298520783b713bf28efb89dfb81c80ea49b! Will try again. An error occurred while installing pytz==2019.3 --hash=sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d --hash=sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be! Will try again. An error occurred while installing selenium==3.141.0 --hash=sha256:2d7131d7bc5a5b99a2d9b04aaf2612c411b03b8ca1b1ee8d3de5845a9be2cb3c --hash=sha256:deaf32b60ad91a4611b98d8002757f29e6f2c2d5fcaf202e1c9ad06d6772300d! Will try again. An error occurred while installing sqlparse==0.3.0 --hash=sha256:40afe6b8d4b1117e7dff5504d7a8ce07d9a1b15aeeade8a2d10f130a834f8177 --hash=sha256:7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873! Will try again. An error occurred while installing urllib3==1.25.6 --hash=sha256:3de946ffbed6e6746608990594d08faac602528ac7015ac28d33cee6a45b7398 --hash=sha256:9a107b99a5393caf59c7aa3c1249c16e6879447533d0887f4336dde834c7be86! Will try again. ================================ 5/5 - 00:00:00 Installing initially failed dependencies… ================================ 5/5 - 00:00:02 [pipenv.exceptions.InstallError]: File "c:\users\hoge\appdata\local\programs\python\python37\lib\site-packages\pipenv\cli\command.py", line 254, in install [pipenv.exceptions.InstallError]: editable_packages=state.installstate.editables, [pipenv.exceptions.InstallError]: File "c:\users\hoge\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1992, in do_install [pipenv.exceptions.InstallError]: skip_lock=skip_lock, [pipenv.exceptions.InstallError]: File "c:\users\hoge\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 1253, in do_init [pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror, [pipenv.exceptions.InstallError]: File "c:\users\hoge\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 862, in do_install_dependencies [pipenv.exceptions.InstallError]: _cleanup_procs(procs, False, failed_deps_queue, retry=False) [pipenv.exceptions.InstallError]: File "c:\users\hoge\appdata\local\programs\python\python37\lib\site-packages\pipenv\core.py", line 681, in _cleanup_procs [pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines) [pipenv.exceptions.InstallError]: [] [pipenv.exceptions.InstallError]: ['Traceback (most recent call last):', ' File "C:\Users\hoge\AppData\Local\Programs\Python\Python37\Lib\runpy.py", line 193, in _run_module_as_main', ' "__main__", mod_spec)', ' File "C:\Users\hoge\AppData\Local\Programs\Python\Python37\Lib\runpy.py", line 85, in _run_code', ' exec(code, run_globals)', ' File "C:\Users\hoge\Dropbox\python\Dam_friend\.venv\Scripts\pip.exe\__main__.py", line 5, in <module>', "ModuleNotFoundError: No module named 'pip._internal.main'"] ERROR: ERROR: Package installation failed...

試したこと

  • インストール時にrock をはずしてみましたが 関係ありませんでした。(pipenv install selenium --skip-lock)
  • djangoが入っていない環境へのインストールは可能でした。

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

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

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

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

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

guest

回答1

0

自己解決

djangoが入っていない環境ではSeleniumなどをインストールできていたので、ダメ元で必要はものを一通りインストールした後に djangoを入れてみたら インストールできました。

理由は分かりませんが 作業が続けられるので良かったです。

投稿2019/11/07 13:26

e_nasu

総合スコア11

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問