我在运行 pipenv install --dev
这给了我以下错误
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (2df4c1)…
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory
Output:
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory
Output:
Failed to load paths: /bin/sh: /Users/XXXX/.local/share/virtualenvs/my-service-enGYxXYk/bin/python: No such file or directory
我真的不想改变命令,我宁愿解决潜在的问题,因为它是其他人正在使用的项目中 package.json 文件的一部分,而不是我只是想在自己的机器上运行的东西。谢谢
最佳答案
删除您的 Pipfile.lock 并尝试重新运行 pipenv install 以从您的 Pipfile 重建您的依赖项。它正在寻找一个不存在的虚拟环境。通过删除您的 Pipfile.lock,您可以强制 pipenv 创建一个新环境。
关于python - pipenv 安装给出无法加载路径错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63341773/