从本地目录安装时出现Python安装生成控制盘错误

2024-04-26 07:39:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我想从GitHub安装一个使用Cython(https://github.com/mlysy/kalmantv)的包。我在本地克隆了该包,在尝试使用pip install .安装它之后,出现以下错误:

DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Processing /Users/me/Downloads/kalmantv
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk
       cwd: /Users/me/Downloads/kalmantv
  Complete output (6 lines):
  running egg_info
  writing kalmantv.egg-info/PKG-INFO
  writing dependency_links to kalmantv.egg-info/dependency_links.txt
  writing requirements to kalmantv.egg-info/requires.txt
  writing top-level names to kalmantv.egg-info/top_level.txt
  error: package directory 'eigen-3.3.7' does not exist
  ----------------------------------------
WARNING: Discarding file:///Users/me/Downloads/kalmantv. Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.
ERROR: Command errored out with exit status 1: /Users/me/.pyenv/versions/3.8.3/bin/python3.8 /Users/me/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/g1/0pjsd_bs24jgccrd6g0lzfvc0000gn/T/tmpxmrdlgnk Check the logs for full command output.

我尝试从弃用警告中添加--use-feature=in-tree-build,但仍然出现错误(没有初始警告)

我看到了一些建议,比如使用pip install --upgrade pip setuptools wheel,但没有任何效果。我想这有一个简单的解决办法,但这东西是有点超过我的头,我不想打破任何其他东西

我需要做什么才能安全地更正此问题,而不会导致其他问题


Tags: piptoinbuildinfopyenvforegg
1条回答
网友
1楼 · 发布于 2024-04-26 07:39:15

setup.py文件包含以下行:

# path to eigen library
EIGEN_PATH = r"eigen-3.3.7"

奇怪的是,它似乎期望Eigen头库出现在该位置。您可以使用brew install eigensudo apt install libeigen3-dev安装库。请注意,这可能不会安装项目所期望的3.3.7版库。我不知道使用新版本是否会导致任何问题

如果要安装3.3.7版,可以通过以下these instructions链接从源代码构建并安装它:

https://gitlab.com/libeigen/eigen/-/releases/3.3.7

完成后,更改到项目目录,并创建指向Eigen库的符号链接:

如果与brew一起安装:ln -s /usr/local/Cellar/eigen/*/include/eigen3 eigen-3.3.7

如果与apt一起安装:ln -s /usr/include/eigen3 eigen-3.3.7

如果从源安装:/usr/local/include/eigen3 eigen-3.3.7

一旦安装了Eigen库并在./eigen-3.3.7可用,pip install .应该可以工作,但是为了获得良好的效果,您应该首先运行以下命令:

pip install -U pip setuptools wheel; pip install -U cython

如果遇到如下错误,请参阅Catalina C++: Using <cmath> headers yield error: no member named 'signbit' in the global namespaceerror: no member named 'signbit' in the global namespace

相关问题 更多 >