我试图在python脚本中使用regex包,使用:
import regex as re这个包裹不见了:
$ ./lula2.py
Traceback (most recent call last):
File "./lula2.py", line 13, in
import regex as re
ImportError: No module named regex我正在尝试安装它,并收到以下错误/失败:
$ sudo apt install regex
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package regex
$ sudo apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-pip请告诉我如何安装regex。
发布于 2019-04-07 15:04:15
python-pip和python-regex包位于宇宙存储库中。使用以下方法启用该功能:
sudo add-apt-repository universe
sudo apt update然后安装regex:
sudo apt install python-regex #For Python 2
sudo apt install python3-regex #For Python 3如果您想使用pip安装regex:
https://askubuntu.com/questions/1131888
复制相似问题