python - 本地到服务器的 pipelinev 不一致

标签 python pip pipenv

我使用 pipelinev 来管理我的依赖项, 我有以下命令在我的本地计算机上运行良好:

pipenv install --dev

但是当我在服务器上运行它时,出现以下错误:

n error occurred while installing pyparsing==2.4.1 --hash=sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238 --hash=sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800 --hash=sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238 --hash=sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 237/237 — 00:00:30
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]:   File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]:   File "/home/ubuntu/.local/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "/home/ubuntu/.local/lib/python3.6/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]: ['Collecting pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1))']
[pipenv.exceptions.InstallError]: ['ERROR: Could not find a version that satisfies the requirement pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1)) (from versions: 1.4.6, 1.4.7, 1.4.8, 1.4.11, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1.1, 2.4.2a1)', 'ERROR: No matching distribution found for pyparsing==2.4.1 (from -r /tmp/pipenv-nfz65sbh-requirements/pipenv-11553m_x-requirement.txt (line 1))']

我之前处理过 pipelinev 错误,大多数都是相当合理的(依赖项和子依赖项之间的冲突),但是这个对我来说意义不大,因为我没有专门安装这个包,而是 pipelinenv 将它添加到 pipfile 中。锁定并且找不到该版本,而本地该版本由于某种原因可用。

我也不知道哪个依赖项要求该特定版本。

Pipfile.lock 部分:

"pyparsing": {
            "hashes": [
                "sha256:530d8bf8cc93a34019d08142593cf4d78a05c890da8cf87ffa3120af53772238",
                "sha256:f78e99616b6f1a4745c0580e170251ef1bbafc0d0513e270c4bd281bf29d2800"
            ],
            "version": "==2.4.1"
        },

有什么想法吗?

编辑: 您可以在 pyparsing 的发行版中看到该版本确实存在。查看here

最佳答案

原来pyparsing删除了一个版本,真是奇怪。

我最终更新了一个包(scipy)并将 pyparsing 更新到 2.4.1.1,现在工作正常

关于python - 本地到服务器的 pipelinev 不一致,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57200460/

相关文章:

python - 在 Wagtail 页面上禁用 CSRF 验证

python - Pip 安装失败,出现 “connection error"ssl 问题

python - pipenv 仅使用站点包

python - 为什么执行代码后在 pipenv 环境中显示语法错误

python - 如何获取结构命令来更新输出?

python - 多处理 : map vs map_async

python - 使用 utf-8 编码后,在 Natural Reader 中用 ' 代替 '

python 从命令行读取多个键值(字典)到变量中

python - 无法升级 Pip。没有权限。为什么?

python - 我的 pip 在 Windows 上坏了,我该如何修复?