ubuntu16.04安装oplympe
一、. 克隆parrot-groundsdk存储库工作区
cd $HOME
$ mkdir -p code/parrot-groundsdk
$ cd code/parrot-groundsdk
$ pwd
~/code/parrot-groundsdk
$ repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git
$ repo sync
运行过程
ning@ning:~/Project/parrot-groundsdk$ repo init -u https://github.com/Parrot-Developers/groundsdk-manifest.git --repo-url=git://codeaurora.org/tools/repo.git --repo-branch=caf-stable
Get git://codeaurora.org/tools/repo.git
remote: Enumerating objects: 5630, done.
remote: Total 5630 (delta 0), reused 0 (delta 0), pack-reused 5630
Receiving objects: 100% (5630/5630), 1.42 MiB | 11.00 KiB/s, done.
Resolving deltas: 100% (3855/3855), done.
From git://codeaurora.org/tools/repo
* [new branch] aosp-new/maint -> origin/aosp-new/maint
* [new branch] aosp-new/master -> origin/aosp-new/master
* [new branch] aosp-new/repo-1 -> origin/aosp-new/repo-1
* [new branch] aosp-new/stable -> origin/aosp-new/stable
* [new branch] caf-stable -> origin/caf-stable
* [new branch] master -> origin/master
* [new branch] repo-2 -> origin/repo-2
* [new branch] stable -> origin/stable
* [new tag] v1.0 -> v1.0
* [new tag] v1.0.1 -> v1.0.1
* [new tag] v1.0.2 -> v1.0.2
* [new tag] v1.0.3 -> v1.0.3
* [new tag] v1.0.4 -> v1.0.4
* [new tag] v1.0.5 -> v1.0.5
* [new tag] v1.0.6 -> v1.0.6
中间有提示
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
首先,需要明确这些log不是致命ERROR,只是提醒 Server does not provide clone.bundle; 只要还在运行,最终结果为 done即可。
最终结果为
二、安装olympe-linux依赖项
要安装“ parrot-groundsdk”工作空间的依赖项,只需执行postinst脚本即可。
$ pwd
~/code/parrot-groundsdk
$ ./products/olympe/linux/env/postinst
执行过程中遇到以下几个问题
1.无法定位libclang-11.-dev
在./products/olympe/linux/env/postinst中把
# Install system packages with apt
${SUDO} apt-get update || true # who doesn't have invalid/broken apt sources
# Install python
${SUDO} apt-get -y install python3 python3-dev python3-pip wget
# olympe-deps build dependencies
${SUDO} /usr/bin/python3 -m pip install clang
#self edited
#CLANG_VERSION=$(/usr/bin/python3 -m pip show clang |grep '^Version' |cut -d' ' -f2 |cut -c1-3)
# ${SUDO} apt-get -y install libclang-${CLANG_VERSION}-dev//这句话和上句话都注释掉
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
virtualenv from https://files.pythonhosted.org/packages/a1/4c/d308cd6fcf86099c5f6902a8373940c8f59a2f07d42dc22d35ae798fdd3a/virtualenv-20.0.35-py2.py3-none-any.whl#sha256=0ebc633426d7468664067309842c81edab11ae97fcaf27e8ad7f5748c89b431b:
Expected sha256 0ebc633426d7468664067309842c81edab11ae97fcaf27e8ad7f5748c89b431b
Got 4d784a63392ba1f3354329b4462a502d752d7c335ecd713e158d181b0d4457e2
解决办法:更换pip源
具体操作:
mkdir ~/.pip/pip.conf
gedit ~/.pip/pip.conf
//将下面的内容复制到conf文件中
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
sphinx-substitution-extensions 2018.11.12.3 requires sphinx==1.8.2, but you'll have sphinx 1.8.5 which is incompatible.
解决办法:在命令后加上–use-feature=2020-resolver
具体操作:打开./products/olympe/linux/env/postinst,在最后一行后面加上--use-feature=2020-resolver
# Perform a clean pip installation of all dependencies:
# - use ignore-installed to force the installation of a package even if it is
# present outside the virtual env
# - prior to this brutal installation, uninstall every dependencies so that
# files that belong to a previous version of a dependency are removed
${ENV_DIR}/setenv pip uninstall --yes $(echo "$PY_REQS_TXT"|xargs -d '\n' -I{} echo -r {})
${ENV_DIR}/setenv pip install --ignore-installed $(echo "$PY_REQS_TXT"|xargs -d '\n' -I{} echo -r {}) --use-feature=2020-resolver //在这里添加
问题没解决
ERROR: Cannot install sphinx==1.8.5, Sphinx, sphinx==1.8.5, -r /home/ning/Project/parrot-groundsdk/packages/groundsdk-android/doc/requirements.txt (line 2) and -r /home/ning/Project/parrot-groundsdk/packages/groundsdk-android/doc/requirements.txt (line 3) because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested sphinx==1.8.5
The user requested Sphinx
The user requested sphinx==1.8.5
sphinx-prompt 1.0.0 depends on Sphinx
sphinx-substitution-extensions 2018.11.12.3 depends on sphinx==1.8.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/home/ning/Project/parrot-groundsdk/.python/py3/bin/python -m pip install --upgrade pip' command.
打开parrot-groundsdk文件夹,搜索requirments.txt,总共5个requirments.txt。
每一个都打开,如果里面有sphinx==1.8.5
,则把后面的==1.8.5删掉,变成如下所示
重新执行./products/olympe/linux/env/postinst
命令,安装成功
四、编译olympe-linux
Olympe依赖于一些red同步后需要(重新)构建的arsdk C库。
在使用Olympe之前,我们需要先构建arsdk。将来,每次repo sync之后将需要以下命令。
$ pwd
~/code/parrot-groundsdk
$ ./build.sh -p olympe-linux -A all final -j
编译完成是这样子
五、搭建环境
最后,您需要设置将在其中执行Olympe脚本的shell环境。将来,您必须在执行Olympe脚本之前执行此操作。
source ./products/olympe/linux/env/shell
如果source成功,就会发现用户名前有个前缀(olympe-python3)
,输入pip --version
,就会发现pip是/home/ning/Project/parrot-groundsdk/.python/py3/lib/python3.5/site-packages/pip (python 3.5)
路径下的而不是自己原来电脑里的pip。
现在,可以在此控制台中执行Olympe脚本。
测试激活olympe环境后,执行命令python -c 'import olympe; print("Installation OK")'
,输出Installation OK
大功告成!!!
重来
按照之前的法子装,中间报错找不到libclang11.-dev,参考办法
然后继续安装,会报错
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
sphinx-substitution-extensions 2018.11.12.3 requires sphinx==1.8.2, but you'll have sphinx 1.8.5 which is incompatible.
打开
和
把里面的Sphinx-Substitution-Extensions==2018.11.12.3
删掉,重新编译,其余步骤和之前的一样。明天到实验室后拿飞机试试
第二天到了,还是不行。。。。