Python 2.7
Python 3.6
Python 3.7
Python 2.7 | Python 3.6 | Python 3.7 |
---|---|---|
C:\Server\Python27 | C:\Server\Python36 | C:\Server\Python37 |
cd C:\Server\Python XX\Lib\site-packages
旧名称 | 新名称 |
---|---|
C:\Server\Python27\python.exe | C:\Server\Python27\python27.exe |
C:\Server\Python36\python.exe | C:\Server\Python36\python36.exe |
C:\Server\Python37\python.exe | C:\Server\Python37\python37.exe |
pip-20.2.4
Traceback (most recent call last):
File "" , line 17, in <module>
File "c:\users\admini~1\appdata\local\temp\pip_build_Administrator\pip\setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
python27 setup.py install
python36 setup.py install
python37 setup.py install
pip27 -V
pip36 -V
pip37 -V
pip36 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
至此,python多环境并存问题解决
cd C:\WorkSpace\OpenCV
pip36 install virtualenv
virtualenv venv
cd .\venv\Scripts
activate
pip install opencv-python==3.4.1.15 opencv-contrib-python==3.4.1.15 jupyter matplotlib
(venv)C:\WorkSpace\OpenCV>jupyter notebook