[英]How to solve problem "ModuleNotFoundError: No module named 'mac"
First I did pip3 install pymouse, then in the file (let's call it file1): import pymouse首先我做了 pip3 install pymouse,然后在文件中(我们称之为 file1):import pymouse
running the code (Python 3 file1.py), and the error "Module Not Found Error: No module named 'mac'" crashes运行代码(Python 3 file1.py),错误“找不到模块错误:没有名为'mac'的模块”崩溃
At the same time, everything was fine earlier, but after I installed homeBrew, such errors began同时,之前一切都很好,但是我安装了homeBrew之后,就开始出现这样的错误
Solution - "brew install python"解决方案 - “brew install python”
You can install Python3 with pyenv:您可以使用 pyenv 安装 Python3:
brew install pyenv酿造安装pyenv
pyenv install <python_version> pyenv 安装 <python_version>
For example:例如:
** pyenv install 3.10.7 ** pyenv 安装 3.10.7
To set the newly installed version as the default将新安装的版本设置为默认版本
3) pyenv global <python_version> 3) pyenv 全局 <python_version>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.