pip install python-ghost-cursor
WARNING: Ignoring invalid distribution -ip (c:python310libsite-packages)
WARNING: Ignoring invalid distribution -ip (c:python310libsite-packages)
Collecting bezier
Using cached bezier-2021.2.12.tar.gz (313 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
The BEZIER_INSTALL_PREFIX environment variable must be set.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: Ignoring invalid distribution -ip (c:python310libsite-packages)
WARNING: Ignoring invalid distribution -ip (c:python310libsite-packages)
WARNING: Ignoring invalid distribution -ip (c:python310libsite-packages)
我在安装库方面相当缺乏经验,所以我不知道如何设置有问题的环境变量。我们将不胜感激。这一切都是在Win10命令行中的特定目录中完成的。
这不是您做错了什么,这是来自bezier
库的错误,它是您试图安装的包的依赖项。
解决方案是使用python 3.9版
以下是github 问题的链接
或者这是维护人员的解释。
自从Python 3.10发布以来,我还没有发布过bezier,所以3.10没有预构建的轮子。
如果您想安装不带扩展的纯Python,请按照文档https://bezier.readthedocs.io/en/2021.2.12/#installing:
BEZIER_NO_EXTENSION=true
python-m pip install--upgrade BEZIER--NO binary=BEZIER如果您想使用二进制扩展进行安装(即,使用您提到的cmake(,请从dev-docshttps://bezier.readthedocs.io/en/2021.2.12/development.html#libbezier:
SRC_DIR=";src/fortran/";BUILD_DIR="libbezier调试/构建";INSTALL_PREFIX="/libbezier调试/usr/;mkdir-p"${BUILD_DIR}";cmake
-DCMAKE_BUILD_TYPE=调试
-DCMAKE_INSTALL_PREFIX:PATH="{INSTALL_PREFIX}">
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-S"{SRC_DIR}">
-B"{BUILD_DIR}";cmake
--build"{BUILD_DIR}">
-配置调试
-目标安装然后你可以运行
BEZIER_INSTALL_PRIFIX="${INSTALL_PREFIX}";python-m pip安装bezier