python - pycharm2.7.3无法import模块

 手机用户2502851955 发布于 2022-10-27 02:42

1.问题:pycharm2.7.3无法import pyperclip模块,已经从https://pypi.python.org/pypi/...下载安装过pyperclip-1.5.27,但是仍然无法导入

2.代码:

import re
import pyperclip

phoneRegex = re.compile(r'''(
     (\d{3}|\(\d{3}\))?         # area code
     (\s|-|\.)?                 #
     (\d{3})
     (\s|-|\.)
     (\d{4})
     (\s*(ext|x|ext.)\s*(\d{2,5}))?
     )''',re.VERBOSE)

3.报错信息:
ImportError: No module named pyperclip

4.截图:

2 个回答
  • 是不是使用了不同的python版本,然后一个版本没装这个模块

    2022-10-27 02:42 回答
  • pip install pyperclip

    2022-10-27 02:42 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有