python-3.x - 无法通过 pip 安装 couchbase:找不到“libcouchbase/couchbase.h”文件
问题描述
我在安装 couchbase 依赖项时遇到了一些问题。
首先,我使用 brew 安装了 v2:
brew install libcouchbase@2
这给了我 v2.10.7。然后我尝试安装我需要的版本:
pip install couchbase==2.5.5
但我一直有这个问题:
ERROR: Command errored out with exit status 1:
...
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -I/Users/.../.pyenv/versions/3.6.8/include/python3.6m -c src/exceptions.c -o build/temp.macosx-10.13-x86_64-3.6/src/exceptions.o
In file included from src/exceptions.c:17:
src/pycbc.h:193:10: fatal error: 'libcouchbase/couchbase.h' file not found
#include <libcouchbase/couchbase.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
有任何想法吗?
解决方案
我找到了解决方案!我必须运行以下命令:
brew link --force --overwrite libcouchbase@2
然后我得到:
Linking /usr/local/Cellar/libcouchbase@2/2.10.7... 77 symlinks created
在此之后我跑了:
pip install couchbase==2.5.5
而且效果很好!:)
推荐阅读
- nativescript - nativescript 中的 tns 和 ns 有什么区别?
- react-native - onChangeText 值更改时如何取消选中复选框?
- html - 如何修改 VS Code HTML 格式化程序?
- c# - 将其存储在数组列表中
- python - 如何解决 TypeError:只能将 str(不是“int”)连接到 str [已解决]
- javascript - 使用 React Native 将参数传递给另一个页面
- python - 在 Django url 中使用阿拉伯字母会导致 404 错误
- c++ - Boost Geometry 多边形内两点之间的路径
- firebase - 为什么 Flutter Streambuilder 小部件 ( onAuthStateChanged ) 对象给出红色下划线?
- angular - 为什么调用方法在服务调用没有完成的情况下继续执行?