安装milvus开发环境出现的问题与解决过程

610 阅读2分钟

1、系统环境:
操作系统:Windows10,Python版本:python-3.10.11-amd64. 安装milvus示例项目bootcamp中question_answering_system中的 requirements.txt文件

PyMySQL
numpy
pymilvus==2.0.2
pandas==1.4.3
sentence_transformers==1.2.0

安装命令如下:

pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
问题一:
# [ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects](https://stackoverflow.com/questions/72401377/error-could-not-build-wheels-for-pandas-which-is-required-to-install-pyproject)

C:\Users\PC>pip install pandas
WARNING: Ignoring invalid distribution -ywin32 (c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages)
WARNING: Ignoring invalid distribution -ywin32 (c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages)
Collecting pandas
  Using cached pandas-1.4.2.tar.gz (4.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy>=1.21.0 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from pandas) (1.22.4)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from pandas) (2.8.2)
Collecting pytz>=2020.1
  Using cached pytz-2022.1-py2.py3-none-any.whl (503 kB)
Requirement already satisfied: six>=1.5 in c:\users\pc\appdata\local\programs\python\python310-32\lib\site-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)
Building wheels for collected packages: pandas
  Building wheel for pandas (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pandas (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [2010 lines of output]
      C:\Users\PC\AppData\Local\Temp\pip-build-env-q3kdt5nb\overlay\Lib\site-packages\setuptools\config\setupcfg.py:459: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)

www.lfd.uci.edu/~gohlke/pyt… 下载“- pandas‑1.4.3‑cp310‑cp310‑win_amd64.whl” 到本地,在下载目录安装:

pip install pandas-1.4.3-cp310-cp310-win_amd64.whl
问题二:

安装中出现下列错误:

Running setup.py install for grpcio ... error

升级pip,setuptools 再安装:

python -m pip install --upgrade pip
python -m pip install --upgrade setuptools

问题三

随后出现下列错误:

Building wheels for collected packages: grpcio
  Building wheel for grpcio (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for grpcio (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [2071 lines of output]
      <string>:31: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Found cython-generated files...
      ASM Builds for BoringSSL currently not supported on: win-amd64

网上提示需要安装vc++ ,参考:github.com/grpc/grpc/i…
I have downloaded and installed latest vc++ build tools from visualstudio.microsoft.com/visual-cpp-…; still facing the same issue.

image.png 但问题并没有解决,后面一直无法找到解决方法,最后只好升级milvus==2.3.3到最新的版本,可正常安装。

pip install pymilvus