gpt4 book ai didi

python-3.x - 安装 pip3 包。获取 "command ' clang' 失败,退出状态为 1"

转载 作者:行者123 更新时间:2023-12-04 01:18:25 25 4
gpt4 key购买 nike

我正在遵循本指南:https://freedomnode.com/blog/69/how-to-install-an-electrum-server-using-full-bitcoin-node-and-electrumx

目前卡在这一步,安装pip3 deps
安装所需的 Python 包
pip3 install aiohttp pylru leveldb plyvel
运行该命令后,我收到以下错误/警告

1 warning generated.
clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c leveldb/util/cache.cc -o build/temp.macosx-10.13-x86_64-3.6/leveldb/util/cache.o -I./leveldb/include -I./leveldb -I./snappy -I. -fno-builtin-memcmp -O2 -fPIC -DNDEBUG -DSNAPPY -DOS_MACOSX -DLEVELDB_PLATFORM_POSIX -Wno-error=unused-command-line-argument-hard-error-in-future
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future'; did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
In file included from leveldb/util/cache.cc:10:
In file included from ./leveldb/port/port.h:14:
In file included from ./leveldb/port/port_posix.h:50:
./leveldb/port/atomic_pointer.h:56:3: warning: 'OSMemoryBarrier' is deprecated: first deprecated in macOS 10.12 - Use std::atomic_thread_fence() from <atomic> instead [-Wdeprecated-declarations]
OSMemoryBarrier();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libkern/OSAtomicDeprecated.h:749:9: note: 'OSMemoryBarrier' has been explicitly marked deprecated here
void OSMemoryBarrier( void );
^
leveldb/util/cache.cc:322:14: error: allocating an object of abstract class type 'leveldb::(anonymous namespace)::ShardedLRUCache'
return new ShardedLRUCache(capacity);
^
/usr/local/include/leveldb/cache.h:94:18: note: unimplemented pure virtual method 'TotalCharge' in 'ShardedLRUCache'
virtual size_t TotalCharge() const = 0;
^
2 warnings and 1 error generated.
error: command 'clang' failed with exit status 1

----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/mv/63xqwfld3sbc4dk63fwj7f4h0000gn/T/pip-build-5vi7gmvb/leveldb/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/mv/63xqwfld3sbc4dk63fwj7f4h0000gn/T/pip-t8d4xlfy-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mv/63xqwfld3sbc4dk63fwj7f4h0000gn/T/pip-build-5vi7gmvb/leveldb/

pip3 list将显示以下内容, leveldb没有安装。

enter image description here

最佳答案

谷歌搜索错误消息发现此 https://github.com/peercoin/peercoin/issues/234

It seems your compiling against the system installed leveldb instead of the leveldb in src directory. If possible try uninstalling leveldb from your system (if it is not needed by other applications of course).



我建议你通过 brew 安装 leveldb
 brew install leveldb

关于python-3.x - 安装 pip3 包。获取 "command ' clang' 失败,退出状态为 1",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48914462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com