使用 Mac 10.13.2、PyCharm 2017.3(社区版)、Python 3.6.4:
我一直在寻找高低,但没有运气,因为我尝试过的任何东西都不起作用。我已经安装Python 3.6
并PyCharm
成功,但是当我安装模块和PyCharm时time
,它让我发疯。PyBluez
openpyxl
无法安装时间模块包的答案time
是The time module is part of Python's standard library. It's installed along with the rest of Python, and you don't need to (nor can you!) install it with pip.
我安装PyBluez
模块时的错误警告信息始终如下:
PermissionError:[Errno 13] 权限被拒绝:'/Users/ringo/Library/Caches/pip/wheels/e7/40/9d/b772a3cf2ca121e87a06eabe9483271816581dec7c772272d3'
当它发生时,我更改为使用命令将其安装在终端应用程序中sudo pip3 install PyBluez
错误信息: PyBluez 的构建轮失败
命令“/usr/local/opt/python3/bin/python3.6 -u -c”导入setuptools,tokenize;file ='/private/tmp/pip-build-umoukn9i/PyBluez/setup.py';f=getattr(tokenize, 'open', open)( file );code=f.read().replace('\r \n', '\n');f.close();exec(compile(code, file , 'exec'))" install --record /tmp/pip-53lcxusy-record/install-record.txt -- single-version-externally-managed --compile" 失败,错误代码 1 在 /private/tmp/pip-build-umoukn9i/PyBluez/
安装openpyxl:openpyxl
在终端应用程序中
安装后sudo pip3 install openpyxl
,我重新打开了一个PyCharm项目,但该模块不在包列表中。当我import openpyxl
运行该项目时,ModuleNotFoundError: No module named 'openpyxl'
会出现信息。
如果我用 PyCharm 安装,错误信息和安装时一样PyBluez
如何解决问题?它需要我在继续之前滑动,所以它会减慢我的速度......如果你能分享一些我应该研究的正确方法,我将非常感激。谢谢。