- “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安装模块了。
- 爽吧。。。
相关文章
- 10-25BI数据可视化——Windows环境下Superset1.0版本安装配置方法
- 10-25windows下安装配置Django虚拟环境
- 10-25windows下配置环境变量时,在cmd窗口执行配置的命令时无效的原因
- 10-25windows安装python+配置虚拟环境
- 10-25Jira7.10.1在Windows环境下的安装和配置
- 10-25Windows系统在Python2.7环境下安装numpy, matplotlib, scipy - Lichanghao Blog
- 10-25windows环境下python3安装scrapy教程和安装注意事项
- 10-25Windows环境下利用anaconda3安装python版本的Xgboost
- 10-25windows下安装python模块
- 10-25windows下 Python 安装包的配置