# 安装 Featuretools 可用于 Python 3.9 - 3.12。可以从 [pypi](https://pypi.org/project/featuretools/)、[conda-forge](https://anaconda.org/conda-forge/featuretools) 或 [源代码](https://github.com/alteryx/featuretools) 安装。 要安装 Featuretools,请运行以下命令: ````{tab} PyPI ```console $ python -m pip install featuretools ``` ```` ````{tab} Conda ```console $ conda install -c conda-forge featuretools ``` ```` ## 附加组件 Featuretools 允许用户单独或一次性安装附加组件: ````{tab} PyPI ```{tab} 所有附加组件 ```console $ python -m pip install "featuretools[complete]" ``` ```{tab} Dask ```console $ python -m pip install "featuretools[dask]" ``` ```{tab} NLP 原语 ```console $ python -m pip install "featuretools[nlp]" ``` ```{tab} 高级原语 ```console $ python -m pip install "featuretools[premium]" ``` ```` ````{tab} Conda ```{tab} 所有附加组件 ```console $ conda install -c conda-forge nlp-primitives dask distributed ``` ```{tab} NLP 原语 ```console $ conda install -c conda-forge nlp-primitives ``` ```{tab} Dask ```console $ conda install -c conda-forge dask distributed ``` ```` - **NLP 原语**:在 Featuretools 中使用自然语言处理原语 - **高级原语**:在 Featuretools 中使用高级原语的原语 - **Dask**:用于以并行方式运行 `calculate_feature_matrix`,使用 `n_jobs` ## 安装 Graphviz 为了使用 `EntitySet.plot` 或 `featuretools.graph_feature`,您需要安装 graphviz 库。 ````{tab} macOS (Intel, M1) :new-set: ```{tab} pip ```console $ brew install graphviz $ python -m pip install graphviz ``` ```{tab} conda ```console $ brew install graphviz $ conda install -c conda-forge python-graphviz ``` ```` ````{tab} Ubuntu ```{tab} pip ```console $ sudo apt install graphviz $ python -m pip install graphviz ``` ```{tab} conda ```console $ sudo apt install graphviz $ conda install -c conda-forge python-graphviz ``` ```` ````{tab} Windows ```{tab} pip ```console $ python -m pip install graphviz ``` ```{tab} conda ```console $ conda install -c conda-forge python-graphviz ``` ```` 如果您通过 `pip` 在 **Windows** 上安装了 graphviz,请从 [官方源](https://graphviz.org/download/#windows) 安装 graphviz.exe。 ## 源代码 要从源代码安装 Featuretools,请从 [GitHub](https://github.com/alteryx/featuretools) 克隆仓库,并安装依赖项。 ```bash git clone https://github.com/alteryx/featuretools.git cd featuretools python -m pip install . ``` ## Docker 也可以在 Docker 容器中运行 Featuretools。 您可以通过在容器内作为包安装它(遵循正常的安装指南)或 使用以下命令在 `Dockerfile` 中创建一个预安装 Featuretools 的新镜像: ```dockerfile FROM --platform=linux/x86_64 python:3.9-slim-buster RUN apt update && apt -y update RUN apt install -y build-essential RUN pip3 install --upgrade --quiet pip RUN pip3 install featuretools ``` # 开发 要对代码库做出贡献,请遵循 [这里](https://github.com/alteryx/featuretools/blob/main/contributing.md) 的指南。