繁体   English   中英

使用PyCharm安装模块时的一些问题

[英]Some issues on installing modules with PyCharm

使用Mac 10.13.2,PyCharm 2017.3(社区版),Python 3.6.4:

我一直在搜寻高低,但没有运气,因为我尝试过的任何方法都没有用。我已经成功安装了Python 3.6PyCharm ,但是当我在模块中安装模块timePyBluezopenpyxl time ,这让我发疯了PyCharm。

无法安装时间模块 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. 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'

安装PyBluez的错误信息屏幕快照

发生时,我更改为使用命令sudo pip3 install PyBluez将其安装在终端应用程序中

错误信息: PyBluez的建筑车轮失败

命令“ /usr/local/opt/python3/bin/python3.6 -u -c”导入设置工具,标记化; 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')))“安装--record /tmp/pip-53lcxusy-record/install-record.txt- “单一版本外部管理的--compile”失败,错误代码为/ private / tmp / pip-build-umoukn9i / PyBluez /

安装openpyxl:我安装后openpyxl与终端应用sudo pip3 install openpyxl ,我重新打开一个PyCharm项目,但该模块是不是在list.When我的packege import openpyxl并运行该项目,该信息ModuleNotFoundError: No module named 'openpyxl'发生ModuleNotFoundError: No module named 'openpyxl'

如果我使用PyCharm进行安装,则错误消息与安装PyBluez时的错误消息相同 没有openpyxl

如何解决问题? 它要求我先滑动一下,然后再继续操作,这样才能减慢我的速度...如果您能分享一些我应该研究的正确方法,我将不胜感激。 谢谢。

尝试安装anaconda3而不是python本身https://www.anaconda.com/download/#macos我正在将anaconda用于python

添加更多信息:

无法在Python 3(OSX)中导入蓝牙卡尔·布拉特(Carl Bratt 提出了以下问题,我找到了答案:

这是GitHub上封闭的OS X导入问题#108: http : //github.com/karulis/pybluez/issues/108

这实际上是一个老问题。

作者建议您做的一件事是删除当前安装并使用pip安装GitHub存储库:

git clone https://github.com/karulis/pybluez.git pip install -e pybluez

您可以使用的另一个命令:

pip3 install --upgrade git+https://github.com/rgov/pybluez.git#egg=pybluez

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM