由于 pycares 错误,无法安装 ccxt 包

如何解决由于 pycares 错误,无法安装 ccxt 包

我使用的是 python 3.9.2。 我想在我创建的虚拟环境中安装 ccxt

python3 -m venv venv_cryptofolio

我遇到了一个错误,我在下面发布(但不是完整的,因为与问题描述相比它太大了,堆栈溢出不允许我发布它):

build/temp.macosx-10.14-x86_64-3.9/_cares.c:2682:55: error: too many arguments to function call,expected 6,have 7
  return ares_parse_ptr_reply(x0,x1,x2,x3,x4,x5,x6);
         ~~~~~~~~~~~~~~~~~~~~                         ^~
/usr/local/include/ares.h:653:14: note: 'ares_parse_ptr_reply' declared here
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:2760:59: error: too many arguments to function call,have 7
  { result = ares_parse_ptr_reply(x0,x6); }
             ~~~~~~~~~~~~~~~~~~~~                         ^~
/usr/local/include/ares.h:653:14: note: 'ares_parse_ptr_reply' declared here
CARES_EXTERN int ares_parse_ptr_reply(const unsigned char *abuf,^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4403:14: error: no member named 'ttl' in 'struct ares_mx_reply'
  (void)((p->ttl) | 0);  /* check that 'struct ares_mx_reply.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4419:14: error: no member named 'ttl' in 'struct ares_naptr_reply'
  (void)((p->ttl) | 0);  /* check that 'struct ares_naptr_reply.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4459:14: error: no member named 'ttl' in 'struct ares_soa_reply'
  (void)((p->ttl) | 0);  /* check that 'struct ares_soa_reply.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4473:14: error: no member named 'ttl' in 'struct ares_srv_reply'
  (void)((p->ttl) | 0);  /* check that 'struct ares_srv_reply.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4486:14: error: no member named 'ttl' in 'struct ares_txt_ext'
  (void)((p->ttl) | 0);  /* check that 'struct ares_txt_ext.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4498:14: error: no member named 'ttl' in 'struct ares_txt_reply'
  (void)((p->ttl) | 0);  /* check that 'struct ares_txt_reply.ttl' is an integer */
          ~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4757:12: error: no member named 'ttl' in 'ares_mx_reply'
  { "ttl",offsetof(struct ares_mx_reply,ttl),^                              ~~~
/Library/Developer/CommandLinetools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t,d) __builtin_offsetof(t,d)
                       ^                     ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4758:48: error: no member named 'ttl' in 'struct ares_mx_reply'
           sizeof(((struct ares_mx_reply *)0)->ttl),~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4781:12: error: no member named 'ttl' in 'ares_naptr_reply'
  { "ttl",offsetof(struct ares_naptr_reply,^                                 ~~~
/Library/Developer/CommandLinetools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t,d)
                       ^                     ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4782:51: error: no member named 'ttl' in 'struct ares_naptr_reply'
           sizeof(((struct ares_naptr_reply *)0)->ttl),~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4853:12: error: no member named 'ttl' in 'ares_soa_reply'
  { "ttl",offsetof(struct ares_soa_reply,^                               ~~~
/Library/Developer/CommandLinetools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t,d)
                       ^                     ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4854:49: error: no member named 'ttl' in 'struct ares_soa_reply'
           sizeof(((struct ares_soa_reply *)0)->ttl),~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4871:12: error: no member named 'ttl' in 'ares_srv_reply'
  { "ttl",offsetof(struct ares_srv_reply,d)
                       ^                     ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4872:49: error: no member named 'ttl' in 'struct ares_srv_reply'
           sizeof(((struct ares_srv_reply *)0)->ttl),~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4886:12: error: no member named 'ttl' in 'ares_txt_ext'
  { "ttl",offsetof(struct ares_txt_ext,^                             ~~~
/Library/Developer/CommandLinetools/usr/lib/clang/10.0.1/include/stddef.h:120:24: note: expanded from macro 'offsetof'
#define offsetof(t,d)
                       ^                     ~
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4887:47: error: no member named 'ttl' in 'struct ares_txt_ext'
           sizeof(((struct ares_txt_ext *)0)->ttl),~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
build/temp.macosx-10.14-x86_64-3.9/_cares.c:4898:12: error: no member named 'ttl' in 'ares_txt_reply'
  { "ttl",offsetof(struct ares_txt_reply,d)
                       ^                     ~
Fatal error: too many errors emitted,stopping Now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/clang' Failed with exit code 1

我尝试使用以下命令重新安装 pycares

pip install --upgrade --force-reinstall pycares

结果我得到了一个类似的错误,如果需要,我会在这里发布。

造成这种情况的原因是什么,解决方法是什么?

编辑:

我找到了删除 cares 文件解决方案:

brew uninstall --ignore-dependencies c-ares

这是帮助我找出解决方案的资源:

https://github.com/ccxt/ccxt/issues/4798

解决方法

我找到并回答了我在问题底部发布的内容。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?