gps之pynmea2安装

使用 PyNMEA2 解析 NMEA 0183 协议
Installing with get-pip.py
github
安装日志
li@li-virtual-machine:~$ sudo apt-get install pip
[sudo] li 的密码:
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
E: 无法定位软件包 pip
li@li-virtual-machine:~$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Command ‘curl’ not found, but can be installed with:

sudo apt install curl

li@li-virtual-machine:~$ sudo apt install curl
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
libcurl4
下列【新】软件包将被安装:
curl libcurl4
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 324 个软件包未被升级。
需要下载 373 kB 的归档。
解压缩后会消耗 1,038 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.10 [214 kB]
获取:2 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.10 [159 kB]
已下载 373 kB,耗时 1秒 (277 kB/s)
正在选中未选择的软件包 libcurl4:amd64。
(正在读取数据库 … 系统当前共安装有 182239 个文件和目录。)
正准备解包 …/libcurl4_7.58.0-2ubuntu3.10_amd64.deb …
正在解包 libcurl4:amd64 (7.58.0-2ubuntu3.10) …
正在选中未选择的软件包 curl。
正准备解包 …/curl_7.58.0-2ubuntu3.10_amd64.deb …
正在解包 curl (7.58.0-2ubuntu3.10) …
正在设置 libcurl4:amd64 (7.58.0-2ubuntu3.10) …
正在处理用于 libc-bin (2.27-3ubuntu1.2) 的触发器 …
正在处理用于 man-db (2.8.3-2) 的触发器 …
正在设置 curl (7.58.0-2ubuntu3.10) …
li@li-virtual-machine:~$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1842k 100 1842k 0 0 15770 0 0:01:59 0:01:59 --:–:-- 23603
li@li-virtual-machine:~$ python get-pip.py
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.
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
Downloading pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 36 kB/s
Collecting setuptools
Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
|████████████████████████████████| 583 kB 33 kB/s
Collecting wheel
Downloading wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Installing collected packages: pip, setuptools, wheel
WARNING: The scripts pip, pip2 and pip2.7 are installed in ‘/home/li/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts easy_install and easy_install-2.7 are installed in ‘/home/li/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script wheel is installed in ‘/home/li/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.2.4 setuptools-44.1.1 wheel-0.35.1
li@li-virtual-machine:~$ pip install pynmea2

Command ‘pip’ not found, but can be installed with:

sudo apt install python-pip

li@li-virtual-machine:~$ sudo apt-gat install pip
sudo: apt-gat:找不到命令
li@li-virtual-machine:~$ sudo apt-get install pip
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
E: 无法定位软件包 pip
li@li-virtual-machine:~$ python get-pip.py --no-index --find-links=/local/copies
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.
Defaulting to user installation because normal site-packages is not writeable
Looking in links: /local/copies

WARNING: Url ‘/local/copies’ is ignored. It is either a non-existing path or lacks a specific scheme.
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
li@li-virtual-machine:~$
li@li-virtual-machine:~$ python get-pip.py --no-index --find-links=/local/copies
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.
Defaulting to user installation because normal site-packages is not writeable
Looking in links: /local/copies
WARNING: Url ‘/local/copies’ is ignored. It is either a non-existing path or lacks a specific scheme.
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
li@li-virtual-machine:~$ pip install -U pip

Command ‘pip’ not found, but can be installed with:

sudo apt install python-pip

li@li-virtual-machine:~$ sudo apt install python-pip
正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会同时安装下列软件:
build-essential dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl libexpat1-dev libfakeroot libpython-all-dev libpython-dev libpython2.7-dev
python-all python-all-dev python-asn1crypto python-cffi-backend python-crypto python-cryptography python-dbus python-dev python-enum34 python-gi python-idna python-ipaddress python-keyring
python-keyrings.alt python-pip-whl python-pkg-resources python-secretstorage python-setuptools python-wheel python-xdg python2.7-dev
建议安装:
debian-keyring bzr python-crypto-doc python-cryptography-doc python-cryptography-vectors python-dbus-dbg python-dbus-doc python-enum34-doc python-gi-cairo libkf5wallet-bin gir1.2-gnomekeyring-1.0
python-fs python-gdata python-keyczar python-secretstorage-doc python-setuptools-doc
下列【新】软件包将被安装:
build-essential dpkg-dev fakeroot libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libexpat1-dev libfakeroot libpython-all-dev libpython-dev libpython2.7-dev python-all
python-all-dev python-asn1crypto python-cffi-backend python-crypto python-cryptography python-dbus python-dev python-enum34 python-gi python-idna python-ipaddress python-keyring python-keyrings.alt
python-pip python-pip-whl python-pkg-resources python-secretstorage python-setuptools python-wheel python-xdg python2.7-dev
下列软件包将被升级:
libdpkg-perl
升级了 1 个软件包,新安装了 33 个软件包,要卸载 0 个软件包,有 323 个软件包未被升级。
需要下载 32.9 MB/33.1 MB 的归档。
解压缩后会消耗 56.3 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 dpkg-dev all 1.19.0.5ubuntu2.3 [607 kB]
获取:2 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 build-essential amd64 12.4ubuntu1 [4,758 B]
获取:3 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libfakeroot amd64 1.22-2ubuntu1 [25.9 kB]
获取:4 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 fakeroot amd64 1.22-2ubuntu1 [62.3 kB]
获取:5 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
获取:6 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libalgorithm-diff-xs-perl amd64 0.04-5 [11.1 kB]
获取:7 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
获取:8 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 libexpat1-dev amd64 2.2.5-3ubuntu0.2 [122 kB]
获取:9 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 libpython2.7-dev amd64 2.7.17-1~18.04ubuntu1.2 [28.3 MB]
获取:10 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libpython-dev amd64 2.7.15~rc1-1 [7,684 B]
获取:11 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 libpython-all-dev amd64 2.7.15~rc1-1 [1,092 B]
获取:12 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-all amd64 2.7.15~rc1-1 [1,076 B]
获取:13 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 python2.7-dev amd64 2.7.17-1~18.04ubuntu1.2 [279 kB]
获取:14 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-dev amd64 2.7.15~rc1-1 [1,256 B]
获取:15 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-all-dev amd64 2.7.15~rc1-1 [1,100 B]
获取:16 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-asn1crypto all 0.24.0-1 [72.7 kB]
获取:17 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-cffi-backend amd64 1.11.5-1 [63.4 kB]
获取:18 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-crypto amd64 2.6.1-8ubuntu2 [244 kB]
获取:19 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-enum34 all 1.1.6-2 [34.8 kB]
获取:20 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-idna all 2.6-1 [32.4 kB]
获取:21 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-ipaddress all 1.0.17-1 [18.2 kB]
获取:22 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 python-cryptography amd64 2.1.4-1ubuntu1.4 [276 kB]
获取:23 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-dbus amd64 1.2.6-1 [90.2 kB]
获取:24 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/main amd64 python-gi amd64 3.26.1-2ubuntu1 [197 kB]
获取:25 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-secretstorage all 2.3.1-2 [11.8 kB]
获取:26 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-keyring all 10.6.0-1 [30.6 kB]
获取:27 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-keyrings.alt all 3.0-1 [16.7 kB]
获取:28 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/universe amd64 python-pip-whl all 9.0.1-2.3~ubuntu1.18.04.4 [1,653 kB]
获取:29 http://ftp.sjtu.edu.cn/ubuntu bionic-updates/universe amd64 python-pip all 9.0.1-2.3~ubuntu1.18.04.4 [151 kB]
获取:30 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-pkg-resources all 39.0.1-2 [128 kB]
获取:31 http://ftp.sjtu.edu.cn/ubuntu bionic/main amd64 python-setuptools all 39.0.1-2 [329 kB]
获取:32 http://ftp.sjtu.edu.cn/ubuntu bionic/universe amd64 python-wheel all 0.30.0-0.2 [36.4 kB]
获取:33 http://ftp.sjtu.edu.cn/ubuntu bionic/universe amd64 python-xdg all 0.25-4ubuntu1 [31.3 kB]
已下载 32.9 MB,耗时 3分 23秒 (162 kB/s)
正在从软件包中解出模板:100%
(正在读取数据库 … 系统当前共安装有 182252 个文件和目录。)
正准备解包 …/00-libdpkg-perl_1.19.0.5ubuntu2.3_all.deb …
正在将 libdpkg-perl (1.19.0.5ubuntu2.3) 解包到 (1.19.0.5ubuntu2) 上 …
正在选中未选择的软件包 dpkg-dev。
正准备解包 …/01-dpkg-dev_1.19.0.5ubuntu2.3_all.deb …
正在解包 dpkg-dev (1.19.0.5ubuntu2.3) …
正在选中未选择的软件包 build-essential。
正准备解包 …/02-build-essential_12.4ubuntu1_amd64.deb …
正在解包 build-essential (12.4ubuntu1) …
正在选中未选择的软件包 libfakeroot:amd64。
正准备解包 …/03-libfakeroot_1.22-2ubuntu1_amd64.deb …
正在解包 libfakeroot:amd64 (1.22-2ubuntu1) …
正在选中未选择的软件包 fakeroot。
正准备解包 …/04-fakeroot_1.22-2ubuntu1_amd64.deb …
正在解包 fakeroot (1.22-2ubuntu1) …
正在选中未选择的软件包 libalgorithm-diff-perl。
正准备解包 …/05-libalgorithm-diff-perl_1.19.03-1_all.deb …
正在解包 libalgorithm-diff-perl (1.19.03-1) …
正在选中未选择的软件包 libalgorithm-diff-xs-perl。
正准备解包 …/06-libalgorithm-diff-xs-perl_0.04-5_amd64.deb …
正在解包 libalgorithm-diff-xs-perl (0.04-5) …
正在选中未选择的软件包 libalgorithm-merge-perl。
正准备解包 …/07-libalgorithm-merge-perl_0.08-3_all.deb …
正在解包 libalgorithm-merge-perl (0.08-3) …
正在选中未选择的软件包 libexpat1-dev:amd64。
正准备解包 …/08-libexpat1-dev_2.2.5-3ubuntu0.2_amd64.deb …
正在解包 libexpat1-dev:amd64 (2.2.5-3ubuntu0.2) …
正在选中未选择的软件包 libpython2.7-dev:amd64。
正准备解包 …/09-libpython2.7-dev_2.7.17-1~18.04ubuntu1.2_amd64.deb …
正在解包 libpython2.7-dev:amd64 (2.7.17-1~18.04ubuntu1.2) …
正在选中未选择的软件包 libpython-dev:amd64。
正准备解包 …/10-libpython-dev_2.7.15~rc1-1_amd64.deb …
正在解包 libpython-dev:amd64 (2.7.15~rc1-1) …
正在选中未选择的软件包 libpython-all-dev:amd64。
正准备解包 …/11-libpython-all-dev_2.7.15~rc1-1_amd64.deb …
正在解包 libpython-all-dev:amd64 (2.7.15~rc1-1) …
正在选中未选择的软件包 python-all。
正准备解包 …/12-python-all_2.7.15~rc1-1_amd64.deb …
正在解包 python-all (2.7.15~rc1-1) …
正在选中未选择的软件包 python2.7-dev。
正准备解包 …/13-python2.7-dev_2.7.17-1~18.04ubuntu1.2_amd64.deb …
正在解包 python2.7-dev (2.7.17-1~18.04ubuntu1.2) …
正在选中未选择的软件包 python-dev。
正准备解包 …/14-python-dev_2.7.15~rc1-1_amd64.deb …
正在解包 python-dev (2.7.15~rc1-1) …
正在选中未选择的软件包 python-all-dev。
正准备解包 …/15-python-all-dev_2.7.15~rc1-1_amd64.deb …
正在解包 python-all-dev (2.7.15~rc1-1) …
正在选中未选择的软件包 python-asn1crypto。
正准备解包 …/16-python-asn1crypto_0.24.0-1_all.deb …
正在解包 python-asn1crypto (0.24.0-1) …
正在选中未选择的软件包 python-cffi-backend。
正准备解包 …/17-python-cffi-backend_1.11.5-1_amd64.deb …
正在解包 python-cffi-backend (1.11.5-1) …
正在选中未选择的软件包 python-crypto。
正准备解包 …/18-python-crypto_2.6.1-8ubuntu2_amd64.deb …
正在解包 python-crypto (2.6.1-8ubuntu2) …
正在选中未选择的软件包 python-enum34。
正准备解包 …/19-python-enum34_1.1.6-2_all.deb …
正在解包 python-enum34 (1.1.6-2) …
正在选中未选择的软件包 python-idna。
正准备解包 …/20-python-idna_2.6-1_all.deb …
正在解包 python-idna (2.6-1) …
正在选中未选择的软件包 python-ipaddress。
正准备解包 …/21-python-ipaddress_1.0.17-1_all.deb …
正在解包 python-ipaddress (1.0.17-1) …
正在选中未选择的软件包 python-cryptography。
正准备解包 …/22-python-cryptography_2.1.4-1ubuntu1.4_amd64.deb …
正在解包 python-cryptography (2.1.4-1ubuntu1.4) …
正在选中未选择的软件包 python-dbus。
正准备解包 …/23-python-dbus_1.2.6-1_amd64.deb …
正在解包 python-dbus (1.2.6-1) …
正在选中未选择的软件包 python-gi。
正准备解包 …/24-python-gi_3.26.1-2ubuntu1_amd64.deb …
正在解包 python-gi (3.26.1-2ubuntu1) …
正在选中未选择的软件包 python-secretstorage。
正准备解包 …/25-python-secretstorage_2.3.1-2_all.deb …
正在解包 python-secretstorage (2.3.1-2) …
正在选中未选择的软件包 python-keyring。
正准备解包 …/26-python-keyring_10.6.0-1_all.deb …
正在解包 python-keyring (10.6.0-1) …
正在选中未选择的软件包 python-keyrings.alt。
正准备解包 …/27-python-keyrings.alt_3.0-1_all.deb …
正在解包 python-keyrings.alt (3.0-1) …
正在选中未选择的软件包 python-pip-whl。
正准备解包 …/28-python-pip-whl_9.0.1-2.3~ubuntu1.18.04.4_all.deb …
正在解包 python-pip-whl (9.0.1-2.3~ubuntu1.18.04.4) …
正在选中未选择的软件包 python-pip。
正准备解包 …/29-python-pip_9.0.1-2.3~ubuntu1.18.04.4_all.deb …
正在解包 python-pip (9.0.1-2.3~ubuntu1.18.04.4) …
正在选中未选择的软件包 python-pkg-resources。
正准备解包 …/30-python-pkg-resources_39.0.1-2_all.deb …
正在解包 python-pkg-resources (39.0.1-2) …
正在选中未选择的软件包 python-setuptools。
正准备解包 …/31-python-setuptools_39.0.1-2_all.deb …
正在解包 python-setuptools (39.0.1-2) …
正在选中未选择的软件包 python-wheel。
正准备解包 …/32-python-wheel_0.30.0-0.2_all.deb …
正在解包 python-wheel (0.30.0-0.2) …
正在选中未选择的软件包 python-xdg。
正准备解包 …/33-python-xdg_0.25-4ubuntu1_all.deb …
正在解包 python-xdg (0.25-4ubuntu1) …
正在设置 python-idna (2.6-1) …
正在设置 python-pip-whl (9.0.1-2.3~ubuntu1.18.04.4) …
正在设置 python-asn1crypto (0.24.0-1) …
正在设置 python-crypto (2.6.1-8ubuntu2) …
正在设置 python-wheel (0.30.0-0.2) …
正在设置 libdpkg-perl (1.19.0.5ubuntu2.3) …
正在设置 python-pkg-resources (39.0.1-2) …
正在设置 python-keyrings.alt (3.0-1) …
正在设置 python-cffi-backend (1.11.5-1) …
正在设置 python-gi (3.26.1-2ubuntu1) …
正在设置 dpkg-dev (1.19.0.5ubuntu2.3) …
正在处理用于 libc-bin (2.27-3ubuntu1.2) 的触发器 …
正在设置 libfakeroot:amd64 (1.22-2ubuntu1) …
正在设置 python-enum34 (1.1.6-2) …
正在设置 libalgorithm-diff-perl (1.19.03-1) …
正在设置 libexpat1-dev:amd64 (2.2.5-3ubuntu0.2) …
正在处理用于 man-db (2.8.3-2) 的触发器 …
正在设置 libpython2.7-dev:amd64 (2.7.17-1~18.04ubuntu1.2) …
正在设置 python-dbus (1.2.6-1) …
正在设置 python-ipaddress (1.0.17-1) …
正在设置 python-pip (9.0.1-2.3~ubuntu1.18.04.4) …
正在设置 python2.7-dev (2.7.17-1~18.04ubuntu1.2) …
正在设置 python-all (2.7.15~rc1-1) …
正在设置 python-xdg (0.25-4ubuntu1) …
正在设置 libpython-dev:amd64 (2.7.15~rc1-1) …
正在设置 python-setuptools (39.0.1-2) …
正在设置 build-essential (12.4ubuntu1) …
正在设置 python-dev (2.7.15~rc1-1) …
正在设置 libpython-all-dev:amd64 (2.7.15~rc1-1) …
正在设置 fakeroot (1.22-2ubuntu1) …
update-alternatives: 使用 /usr/bin/fakeroot-sysv 来在自动模式中提供 /usr/bin/fakeroot (fakeroot)
正在设置 libalgorithm-merge-perl (0.08-3) …
正在设置 libalgorithm-diff-xs-perl (0.04-5) …
正在设置 python-all-dev (2.7.15~rc1-1) …
正在设置 python-cryptography (2.1.4-1ubuntu1.4) …
正在设置 python-secretstorage (2.3.1-2) …
正在设置 python-keyring (10.6.0-1) …
正在处理用于 libc-bin (2.27-3ubuntu1.2) 的触发器 …
li@li-virtual-machine:~$ pip install -U pip
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
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.
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: pip in ./.local/lib/python2.7/site-packages (20.2.4)
li@li-virtual-machine:~$ pip install pynmea2
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
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.
Defaulting to user installation because normal site-packages is not writeable
Collecting pynmea2
Downloading pynmea2-1.15.0.tar.gz (26 kB)
Building wheels for collected packages: pynmea2
Building wheel for pynmea2 (setup.py) … done
Created wheel for pynmea2: filename=pynmea2-1.15.0-py2-none-any.whl size=23766 sha256=78e1f5bd858610e6a87906647f9ebfe2ffbf9bcd543646346c7e558d02422c47
Stored in directory: /home/li/.cache/pip/wheels/f7/8b/8a/12db9b9285e3201b4c11f1f26510a1dd951f14bfcec8d4e784
Successfully built pynmea2
Installing collected packages: pynmea2
Successfully installed pynmea2-1.15.0
li@li-virtual-machine:~$ import pynmea2

^Cli@li-virtual-machine:~$ python
python python2.7 python2-config python3.5 python3.5m python3.5.real python3.6m python3m
python2 python2.7-config python3 python3.5-config python3.5m-config python3.6 python3-config python-config
li@li-virtual-machine:~$ python
python python2.7 python2-config python3.5 python3.5m python3.5.real python3.6m python3m
python2 python2.7-config python3 python3.5-config python3.5m-config python3.6 python3-config python-config
li@li-virtual-machine:~$ python3
Python 3.5.3 (default, Jun 29 2020, 03:16:36)
[GCC 6.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

q
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘q’ is not defined

quit
Use quit() or Ctrl-D (i.e. EOF) to exit

ls
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘ls’ is not defined

KeyboardInterrupt

quit()
li@li-virtual-machine:~$ python3
Python 3.5.3 (default, Jun 29 2020, 03:16:36)
[GCC 6.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import pynmea2
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named ‘pynmea2’

quit()
li@li-virtual-machine:~$ pip install pynmea2
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly.
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.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pynmea2 in ./.local/lib/python2.7/site-packages (1.15.0)
li@li-virtual-machine:~$ python2
Python 2.7.17 (default, Sep 30 2020, 13:38:04)
[GCC 7.5.0] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

import pynmea2
lineline = ‘$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,*76’
record = pynmea2.parse(line)
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘line’ is not defined

line = ‘$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,*76’
record = pynmea2.parse(line)
record
<GGA(timestamp=datetime.time(9, 27, 50), lat=‘5321.6802’, lat_dir=‘N’, lon=‘00630.3372’, lon_dir=‘W’, gps_qual=1, num_sats=‘8’, horizontal_dil=‘1.03’, altitude=61.7, altitude_units=‘M’, geo_sep=‘55.2’, geo_sep_units=‘M’, age_gps_data=’’, ref_station_id=’’)>

li@li-virtual-machine:~$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

File “”, line 1

li@li-virtual-machine:~$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
^

注:要import pynmea2

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

<( ̄︶ ̄)Okay.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值