python - Docker 错误(无法为使用 PEP 517 且无法直接安装的 Pandas 构建轮子)
问题描述
首先,我的环境是
[python ver = 3.8]
[django = 3.1.6]
[pandas = 1.1.3 or (1.2.1) use anything]
我使用pycharm,venv
我想让我的 prj 到 docker-compose build
错误:熊猫的构建轮子失败
Failed to build pandas
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly
所以,我去熊猫指南,我看到:
https://pandas.pydata.org/pandas-docs/stable/development/contributing.html?highlight=head
它说:
python -m venv $env:USERPROFILE\virtualenvs\pandas-dev
# Activate the virtualenv. Use activate.bat for cmd.exe
~\virtualenvs\pandas-dev\Scripts\Activate.ps1
# Install the build dependencies
python -m pip install -r requirements-dev.txt
# Build and install pandas
python setup.py build_ext -j 4
python -m pip install -e . --no-build-isolation --no-use-pep517
看起来不错,但我不知道如何应用于我的项目,因为我总是只在 venv 中使用 pip。
python -m pip install -e . --no-build-isolation --no-use-pep517
我该如何使用它?
解决方案
你使用的是什么基础镜像?如果它适用于您的项目,请尝试显式定义更新版本的 python。例如,
FROM python:3.8-slim-buster
推荐阅读
- c# - C# EF Core: How to map One-to-Zero with multiple properties (with Attributes only) [With Workaround]?
- android - BLE response back to Peripheral Connection mobile to mobile
- javascript - How do I use standalone Header in react-navigation with react-native?
- java - Spring Boot 的 JPA Native Query 中未设置参数
- python - PyQt5 无法添加标签以从线程滚动区域
- ansible - Ansible - 在角色剧本中使用条件
- python - 过滤计算字段的 Django 查询,在字符串中搜索字符
- automation - Taurus 等效“连续运行线程组”
- babeljs - 我可以创建自己的 npm 包脚本来定位我的 NEXT.js 项目的文件吗?
- jsdom - 有没有一种方法可以解析字符串并将 querySelector 与 corvid wix 一起使用?