2023-10-31 Python macOS下,Python3安装virtualenv virtualenv 创建的虚拟环境相对较小,只包含 Python 解释器和基本包。适用于任何操作系统和 Python 版本。适用于轻量级项目或只需要 Python 环境的场景。 1234567brew install python3pip3 install virtualenvvirtualenv -p python3 [虚拟环境的存放路径]# 激活虚拟环境source [虚拟环境的存放路径]/bin/activate# 退出虚拟环境deactivate 前一篇 以后可能用到的URL归档 后一篇 UnicodeEncodeError: 'cp932' codec can't encode character '镜' in position 37: illegal multibyte sequence