python - “python setup.py install”自定义依赖位置
问题描述
我目前正在尝试安装与 libyaml 链接的自定义 pyyaml 版本,以测试我的代码执行时间如何从提供的额外性能中受益(如https://pyyaml.org/wiki/PyYAMLDocumentation中所建议)。我已经按照文档中的说明安装了 libyaml
./bootstrap && ./configure --prefix /my/install/location
但是当我为 pyyaml 运行安装时
python setup.py --with-libyaml install
我明白了
creating build/temp.linux-x86_64-2.7/ext
/usr/bin/gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/bin/python2.7 -c ext/_yaml.c -o build/temp.linux-x86_64-2.7/ext/_yaml.o
gcc: error: ext/_yaml.c: No such file or directory
gcc: fatal error: no input files
如何将安装指向/my/install/location
?有没有办法扩展搜索路径以包含额外的位置,或者是否有另一种方式可以将其组合在一起?
解决方案
推荐阅读
- python - 如何使用循环/lambda函数更改df列中的所有值(最简单的方法)
- docker - Docker Redis:“.\docker-compose.yml”中的版本“6.0.8”无效
- r - 使用一组栅格中的最高像素值覆盖栅格值
- r - 如何在 R 中创建具有范围的函数?
- swift - 如何快速在字符串中包含“”
- python - 如何使用 lightgbm 实现学习排名?
- android - AppAuth 的替代方案?
- python-3.x - 从文件夹中导入 file.py 以及其他子文件夹
- reactjs - 为什么我的数据获取自定义钩子会被多次调用?
- android - 如果我使用嵌套的 firebase 引用,回收站视图不起作用