3 回答
TA贡献1784条经验 获得超9个赞
1234 | 输入命令: pip - - version pip2 - - version pip3 - - version |
通过以上命令查看python默认使用pip的版本,尝试使用以下命令升级相应版本的pip
123 | pip install - - upgrade pip pip3 install - - upgrade pip 然后就可以正常更新版本了。 |
TA贡献1825条经验 获得超6个赞
开发环境:
python 2.7.13
raspberry pi 3B
2017-09-07-raspbian-stretch
拓展python必要环境
The build-essential package is required for building Debian packages; python-dev, python-distlib, and python-setuptools provide several Python development and packaging tools; python-pip and python-wheel are useful for installing Python packages; libzmq-dev is needed for Jupyter notebooks; libgdal-dev is needed for geospatial analysis with geopandas.
sudo apt-get install build-essential python-dev python-distlib python-setuptools python-pip python-wheel libzmq-dev libgdal-dev1
sklearn
sudo apt-get install python-sklearn1
opencv
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libopencv-dev sudo apt-get install python-opencv1234
Tkinter
sudo apt-get install tk tk-dev tcl tcl-dev
TA贡献1982条经验 获得超2个赞
先在树莓派上安装python
1 | $ sudo apt - get install python - dev |
2.然后更新
1 | $ sudo easy_install - U distribute |
3.安装python-pip
1 | $ sudo apt - get install python - pip |
4.安装python的GPIO库
1 | $ sudo pip install rpi.gpio |
5.然后去下一本书《python指南》就可以开始学习python基础了。
6.学习完基础,就可以开始树莓派的开发了,网上有很多例子,可以开发机器人的语音识别,自动寻路,开关门等等功能。
添加回答
举报