ubuntu18.04+ros1+python2.7
本系统python默认3.7,可使用虚拟环境创建
创建python2.7的虚拟环境
并且在python2.7环境下执行官方教程的语句。
进入自己创建的环境:
workon virtualenv
退出命令
deactivate
然而进入python2.7环境virtualenv时
import yaml
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
ERROR: Could not find a version that satisfies the requirement yaml (from versions: none)
ERROR: No matching distribution found for yaml
python2.7下安装命令
pip install pyyaml