- “Win +R”打开cmd终端,如果直接在里面使用pip命令的时候,要么出现“syntax invalid”,要么出现:
-
'pip' is not recognized as an internal or external command, operable program or batch file.
此时需要将C:\Python27\Scripts添加到系统环境变量,我顺便将C:\Python27\python.exe也添加进了系统环境变量,要保证echo %PATH%能看到对应的目录。
- 再使用pip install pyserial就可以安装serial模块了,不过我的右如下提示,说我的版本过旧:
-
C:\Users\h144197>pip install pyserial
Requirement already satisfied (use --upgrade to upgrade): pyserial in c:\python27\lib\site-packages
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.照着提示做就好了,类似于linux下的shell。
-
C:\Users\h144197>python -m pip install --upgrade pip
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€¨€| 1.3MB 80kB/s
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-9.0.1现在就可以使用pip安装模块了。
- 爽吧。。。
相关文章
- windows下安装Python虚拟环境virtualenvwrapper-win
- python在windows下安装paramiko模块和安装pycrypto模块(3步搞定)(转)
- Windows 下 MongoDB 的安装与环境配置
- Poechant 快速安装配置教程:Windows 7下Apache+MySQL+PHP开发环境
- 【Redis学习】:Windows环境下的Redis安装与配置
- windows下《Go Web编程》之Go环境配置和安装
- Ubuntu环境下python安装dlib模块
- Windows下安装Ubuntu虚拟机并配置go环境
- Python3.8下载安装步骤及环境变量配置详解
- Windows下JDK8安装以及环境变量配置