赞
踩
上述的截图中,安装
d2l
时,指定了numpy
的版本且从源码构建,报错提示ImpImporter
找不到(此属性在Python 3.12
中被移除,这儿也提到了一些解决办法,但在Mac OS
上不生效),猜测直接升级numpy
版本也能解决此问题。
PyPI
下载d2l源码。setup.py
文件里的requirements
。# 以2024-02-07时最新版本为准
requirements = [
'jupyter==1.0.0',
'numpy==1.26.3',
'matplotlib==3.8.2',
'matplotlib-inline==0.1.6',
'requests==2.31.0',
'pandas==2.2.0',
'scipy==1.12.0'
]
python3 setup.py install
。Help on package d2l: NAME d2l - Saved source code for "Dive into Deep Learning" (https://d2l.ai). DESCRIPTION Please import d2l by one of the following ways: from d2l import mxnet as d2l # Use MXNet as the backend from d2l import torch as d2l # Use PyTorch as the backend from d2l import tensorflow as d2l # Use TensorFlow as the backend from d2l import jax as d2l # Use Jax as the backend PACKAGE CONTENTS jax mxnet tensorflow torch DATA __annotations__ = {} VERSION 1.0.3 FILE /Users/bytedance/Downloads/d2l-1.0.3/d2l/__init__.py
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。