我是python的初学者。 当我想安装NumPy时,我没有用,特别是当执行到达“准备车轮元数据”这一行时,这是错误的:
C:\Users\dell>pip install numpy
Defaulting to user installation because normal site-packages is not writeable
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: 'c:\program files\python39\python.exe' 'c:\program files\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\dell\AppData\Local\Temp\tmphnzlje19' Check the logs for full command output.
答案 0 :(得分:3)
此tempph <- with(df, phone_coalesce(Phone1, Phone2))
tempph
# [1] "7890" "9123" "9456" "8888" "" "3245" "3334" ""
df$new <- paste0(substr(df$first, 1, 3), substr(df$Last, 1, 3), tempph)
df[nzchar(tempph),]
# first Last Phone1 Phone2 new
# 1 apple Jackfruit 1234567890 1234737650 appJac7890
# 2 grape Kiwi (456)7089123 graKiw9123
# 3 rose Mulberry 1230789456 15 rosMul9456
# 4 Jasmine rabbit 8888888888 Jasrab8888
# 6 mango Limes 3336783245 manLim3245
# 7 banana 1112223334 ban3334
命令正在尝试从源代码构建numpy。您会看到这是因为正在下载pip install
文件而不是转盘.zip
文件。 .whl
文件包含源代码。 NumPy的大部分代码都是用C编写的,需要进行编译,但是很可能您的计算机没有安装编译器。 wheel(.zip
)文件不需要编译-它包含已编译的代码,因此您不需要编译器。
编辑(2020年12月15日):wheel文件可用于版本1.19.4,因此可以将.whl
与python 3.9一起使用。
根据https://pypi.org/project/numpy/#files,对于python 3.9还没有wheel文件,因此您的选择是从源代码构建numpy,使用python 3.8直到python 3.9出现numpy wheel,或者使用{{1} },which already distributes numpy for python 3.9。