web-dev-qa-db-ja.com

タイムアウトが原因でpipenvのインストールが失敗する

_C:\Users\danie01\fox\test\robotframework>pipenv install --python 3.5
Creating a virtualenv for this project...
Pipfile: C:\Users\danie01\fox\test\robotframework\Pipfile
Using C:\Users\danie01\AppData\Local\Programs\Python\Python35\python.exe (3.5.0) to create virtualenv...
Traceback (most recent call last):
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\expect.py", line 109, in expect_loop
    return self.timeout()
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\expect.py", line 82, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x05020630>
searcher: searcher_re:
    0: EOF

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\danie01\AppData\Local\Programs\Python\Python36-32\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\cli.py", line 435, in install
    selective_upgrade=selective_upgrade,
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\core.py", line 1759, in do_install
    pypi_mirror=pypi_mirror,
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\core.py", line 609, in ensure_project
    three=three, python=python, site_packages=site_packages, pypi_mirror=pypi_mirror
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\core.py", line 556, in ensure_virtualenv
    do_create_virtualenv(python=python, site_packages=site_packages, pypi_mirror=pypi_mirror)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\core.py", line 934, in do_create_virtualenv
    click.echo(crayons.blue(c.out), err=True)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\delegator.py", line 99, in out
    self.__out = self._pexpect_out
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\delegator.py", line 87, in _pexpect_out
    result += self.subprocess.read()
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\spawnbase.py", line 441, in read
    self.expect(self.delimiter)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\spawnbase.py", line 341, in expect
    timeout, searchwindowsize, async_)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\spawnbase.py", line 369, in expect_list
    return exp.expect_loop(timeout)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\expect.py", line 119, in expect_loop
    return self.timeout(e)
  File "c:\users\danie01\appdata\local\programs\python\python36-32\lib\site-packages\pipenv\vendor\pexpect\expect.py", line 82, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x05020630>
searcher: searcher_re:
    0: EOF
<pexpect.popen_spawn.PopenSpawn object at 0x05020630>
searcher: searcher_re:
    0: EOF
_

問題は、pipenvをpython 3.5でインストールしたいのですが、python 3.6を使用していますか?インストール済みで、PATHにあります。インストーラーがタイムアウトする理由がわかりません。

私は以前に3.6でpipenvをインストールし、それをいくつかの困難で削除しました(virutalenvを手動で削除する必要がありました)ので、それが原因の一部である可能性があります。

編集:

2回目の試行では、Using C:\Users\danie01\AppData\Local\Programs\Python\Python35\python.exe (3.5.0) to create virtualenv...で永久にハングします。

7

Windowsでは、WindowsDefenderをオフにすることでうまくいきました。タイムアウトは発生せず、インストールははるかに高速でした。

3
Jorge Gimeno

古いvirtualenvを削除できますかC:\Users\danie01\.virtualenvs

Pipfile内のpython)のバージョンを確認してください

[requires]
python_version = "3.5"

プロジェクトに移動した後、virtualenvを再度作成します

cd C:\Users\danie01\fox\test\robotframework
pipenv install
0
general03

試してください:

PIPENV_TIMEOUT 

詳細はこちら

0
Deron Lee