我正在尝试通过 pip 在我的 64 位 ARMV8 板上安装 scipy。我已经安装了 scipy 所需的 openblas。所以,没有问题。当我给时pip3 install scipy --trusted-host pypi.org --trusted-host files.pythonhosted.org
,我收到错误Failed building wheel for scipy。我有 pip3 和 pip3.5,/usr/bin
其余的 pip 都在/usr/lib64/python3.5/site-packages
。所以基本上,我也有 pip。
我还尝试使用--no-binary
选项安装 scipy ,这是网络上的答案之一。但是,它给了我同样的错误。下面是我得到的错误。
错误:
Collecting scipy
Downloading scipy-1.4.1.tar.gz (24.6 MB)
|################################| 24.6 MB 6.6 MB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: scipy
Building wheel for scipy (PEP …
Run Code Online (Sandbox Code Playgroud) 我目前正在编写一个 bash 脚本来获取许多逗号分隔字符串中的第一个值。我有一个看起来像这样的文件 -
name
things: "water bottle","40","new phone cover",10
place
Run Code Online (Sandbox Code Playgroud)
我只需要返回第一个双引号中的值。
water bottle
Run Code Online (Sandbox Code Playgroud)
第一个双引号中的值可以是一个单词/两个单词。也就是说,water bottle
有时可以替换为pen
. 我试过 -
awk '/:/ {print $2}'
Run Code Online (Sandbox Code Playgroud)
但这只是给出
water
Run Code Online (Sandbox Code Playgroud)
colon(:)
我想用逗号分隔它,但是后面有things
. 所以,我不确定如何将其分开。如何获取第一个双引号中存在的值?
编辑:
解决方案:我使用了下面的代码,因为我特别想使用 awk -
awk '/:/' test.txt | cut -d\" -f2
Run Code Online (Sandbox Code Playgroud)