我正在尝试将 pip3 与 python 3.9 一起使用来安装模块...我阅读了对 windows 的回复,这些回复建议安装 VisualStudio,因为我们需要一个好的 C++ 编译器
我使用 macOS
我正在添加输入和错误消息以便更好地理解
输入:
rohansaswade@Rohans-MBP ~ % pip3 install numpy
输出: Collecting numpy
Using cached numpy-1.19.2.zip (7.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
我没有提到完整的错误输出,因为它似乎无关紧要,但是如果您需要它来帮助我,请发表评论。我使用 macOS Catalina 10.15.7 和 python 3.9
最佳答案
我遇到过同样的问题。
就我而言,尽管很耗时,但以下步骤有所帮助。
#准备pip install cython
git clone https://github.com/numpy/numpy.git
#脚步cd numpy
python setup.py build
python setup.py install
我希望它也适合你。
关于python - 如何为 MacOS for python 3.9 解决 "Preparing wheel metadata ... error"这个错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64291491/