python - 安装 causalml 包 python 的问题
问题描述
我正在尝试使用 pip 在 Jupyter 中安装包 causalml,但出现以下错误:
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-h3qf0rqq/causalml_92ba9279cfbd4f77ac1f50f04998c187/setup.py'"'"'; __file__='"'"'/tmp/pip-install-h3qf0rqq/causalml_92ba9279cfbd4f77ac1f50f04998c187/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-m0xr_f2v
cwd: /tmp/pip-install-h3qf0rqq/causalml_92ba9279cfbd4f77ac1f50f04998c187/
Complete output (20 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-h3qf0rqq/causalml_92ba9279cfbd4f77ac1f50f04998c187/setup.py", line 56, in <module>
ext_modules=cythonize(extensions),
File "/opt/conda/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 962, in cythonize
ctx = c_options.create_context()
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 597, in create_context
self.cplus, self.language_level, options=self)
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/Main.py", line 80, in __init__
from . import Builtin, CythonScope
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/CythonScope.py", line 5, in <module>
from .UtilityCode import CythonUtilityCode
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/UtilityCode.py", line 3, in <module>
from .TreeFragment import parse_from_strings, StringParseContext
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/TreeFragment.py", line 17, in <module>
from .Visitor import VisitorTransform
File "Cython/Compiler/Visitor.py", line 17, in init Cython.Compiler.Visitor
File "/opt/conda/lib/python3.6/site-packages/Cython/Compiler/ExprNodes.py", line 46, in <module>
from .Pythran import (to_pythran, is_pythran_supported_type, is_pythran_supported_operation_type,
ImportError: cannot import name 'pythran_is_numpy_func_supported'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
在另一个论坛上,我读到这是一个 cython 问题,我已经卸载并重新安装了它,但它没有解决。我正在使用 Python 3.6.10,这里是我系统上依赖包的版本。
setuptools=50.3.0
pip=20.3
numpy=1.18.5
scipy=1.4.1
matplotlib
pandas=1.1.2
scikit-learn=0.23.2
statsmodels=0.12.0
seaborn
Cython=0.29.21
xgboost
pydotplus
tqdm
shap dil
l
lightgbm
pygam
打包
keras
张量流=2.3.0
我检查了依赖要求,我相信上述所有包都可以安装 causalml。我还尝试克隆 git repo 并安装它,但我得到了同样的错误。非常感谢您的反馈和建议。
解决方案
推荐阅读
- node.js - Nodejs DynamoDB DocumentClient FilterExpressions不适用于LastEvaluatedKey?
- java - 如何从另一个类传递类引用?
- r - 使用 dplyr 在 r 数据帧中使用非标准评估和变异
- redux-thunk - 使用 promise 错误测试 createAsyncThunk
- python - 正确使用 PyTorch 的 non_blocking=True 进行数据预取
- asp.net - 我可以用不同的角色覆盖 asp.net 核心的授权吗?
- ios - 如果计划将 Ruby on Rails 用于 IOS 应用程序,我是否需要使用 Core Data?
- java - 将 jBLAS 与 NVBLAS 一起使用
- r - 如何在 geom_violin 中复制 vioplot?
- python - 合并时保留 csv 文件的副本