繁体   English   中英

Windows 中的诗歌安装不起作用

[英]Poetry installation in Windows doesn't work

每当我尝试在 git 存储库中的 powershell 上运行poetry install时,我一直收到这个奇怪的错误,我真的不知道那可能是什么。 我正在使用 Windows 10 和 Python 3.10.0,当我尝试 Linux 时,它运行正常。

Creating virtualenv manim-tx2tvM36-py3.10 in C:\Users\ricci\AppData\Local\pypoetry\Cache\virtualenvs
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.

Package operations: 120 installs, 0 updates, 0 removals

  • Installing attrs (21.2.0)
  • Installing six (1.16.0)

  ValueError

  File \C:\Users\ricci\AppData\Local\pypoetry\Cache\artifacts\f9\2e\54\025dd026b70173a331f1335fa6d1329f5993b949c2f3d623bdda20bf1f\attrs-21.2.0-py2.py3-none-any.whl does not exist

  at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\core\packages\file_dependency.py:40 in __init__
       36│             except FileNotFoundError:
       37│                 raise ValueError("Directory {} does not exist".format(self._path))
       38│
       39│         if not self._full_path.exists():
    →  40│             raise ValueError("File {} does not exist".format(self._path))
       41│
       42│         if self._full_path.is_dir():
       43│             raise ValueError("{} is a directory, expected a file".format(self._path))
       44│


  ValueError

  File \C:\Users\ricci\AppData\Local\pypoetry\Cache\artifacts\89\b2\f8\fd92b6d5daa0f8889429b2fc67ec21eedc5cae5d531ee2853828ced6c7\six-1.16.0-py2.py3-none-any.whl does not exist

  at ~\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\core\packages\file_dependency.py:40 in __init__
       36│             except FileNotFoundError:
       37│                 raise ValueError("Directory {} does not exist".format(self._path))
       38│
       39│         if not self._full_path.exists():
    →  40│             raise ValueError("File {} does not exist".format(self._path))
       41│
       42│         if self._full_path.is_dir():
       43│             raise ValueError("{} is a directory, expected a file".format(self._path))
       44│

我该如何解决这个错误? 我已经想办法解决它了,我做了很多研究,问了一些人,但似乎没有任何效果。

尝试poetry update ,这解决了我的问题。

如问题中所述, poetry install命令无法正常工作。 它抛出了一个错误: attrs-21.2.0-py2.py3-none-any.whl does not exist 我尝试按照本期的建议删除诗歌缓存。 我还尝试降级我当前的 Poetry 安装,但也没有用。 因此,作为最后一次尝试,我从 Poetry Github 页面下载了install-poetry.py ,运行了python install-poetry.py --preview ,然后,在我的仓库中,我运行了poetry update ,并且成功了。 我终于安装了诗歌。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM