请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

pipenv lock很慢,然后出错~我已更换国内的阿里源了,但是出错是为什么?能看下这是什么问题吗?

[root@localhost yiwenyida]# pipenv install -r requirements/local.txt
Requirements file provided! Importing into Pipfile…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py”, line 109, in expect_loop
return self.timeout()
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py”, line 82, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f7b864843c8>
searcher: searcher_re:
0: re.compile(’\n’)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/pipenv”, line 10, in
sys.exit(cli())
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 1137, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py”, line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/cli/command.py”, line 254, in install
editable_packages=state.installstate.editables,
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/core.py”, line 1874, in do_install
keep_outdated=keep_outdated
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/core.py”, line 1244, in do_init
pypi_mirror=pypi_mirror,
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/core.py”, line 1068, in do_lock
lockfile=lockfile
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/utils.py”, line 649, in venv_resolve_deps
c = resolve(cmd, sp)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/utils.py”, line 517, in resolve
result = c.expect(u"\n", timeout=environments.PIPENV_INSTALL_TIMEOUT)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/delegator.py”, line 215, in expect
self.subprocess.expect(pattern=pattern, timeout=timeout)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/spawnbase.py”, line 341, in expect
timeout, searchwindowsize, async
)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/spawnbase.py”, line 369, in expect_list
return exp.expect_loop(timeout)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py”, line 119, in expect_loop
return self.timeout(e)
File “/usr/local/python3/lib/python3.7/site-packages/pipenv/vendor/pexpect/expect.py”, line 82, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x7f7b864843c8>
searcher: searcher_re:
0: re.compile(’\n’)
<pexpect.popen_spawn.PopenSpawn object at 0x7f7b864843c8>
searcher: searcher_re:
0: re.compile(’\n’)

正在回答 回答被采纳积分+3

1回答

Jack 2019-07-09 21:54:43

lock的过程本身很慢与网络环境无关。你把目录下的pipfile和lock文件删掉.

pipenv --rm  # 删掉pipenv之前生成的环境

再重新安装

pipenv install -r xxx/xxx.txt --skip-lock  # 在安装时忽略锁定机制

pipenv现在不向同学们推荐了,好容易出问题不稳定。干脆使用virtualenv

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信