我正在运行Antergos(基于arch的linux)尝试使用命令
安装ROS kineticyaourt ros-kinetic-ros-core
安装时遇到错误说
(7/7) checking keys in keyring [#############################################################################] 100%
(7/7) checking package integrity [#############################################################################] 100%
(7/7) loading package files [#############################################################################] 100%
(7/7) checking for file conflicts [#############################################################################] 100%
error: failed to commit transaction (conflicting files)
python2-setuptools: /usr/bin/easy_install-2.7 exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/easy_install.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/easy_install.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/pkg_resources/__init__.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/pkg_resources/__init__.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/pkg_resources/extern/__init__.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/pkg_resources/extern/__init__.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/__init__.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/__init__.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/archive_util.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/archive_util.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/__init__.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/__init__.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/alias.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/alias.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_egg.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/bdist_wininst.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/build_ext.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/build_ext.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/build_py.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/build_py.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/develop.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/develop.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/easy_install.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/easy_install.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/egg_info.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/egg_info.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_egg_info.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_lib.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_lib.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/install_scripts.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/py36compat.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/py36compat.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/register.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/register.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/rotate.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/rotate.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/saveopts.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/saveopts.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/sdist.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/sdist.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/setopt.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/setopt.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/test.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/test.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/upload.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/upload.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/upload_docs.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/depends.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/depends.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/dist.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/dist.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/extension.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/extension.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/extern/__init__.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/extern/__init__.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/glob.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/glob.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/launch.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/launch.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/lib2to3_ex.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/monkey.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/monkey.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/msvc.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/msvc.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/namespaces.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/namespaces.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/package_index.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/package_index.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py26compat.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py26compat.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py27compat.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py27compat.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py31compat.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/py31compat.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/sandbox.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/sandbox.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/script (dev).tmpl exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/script.tmpl exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/site-patch.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/site-patch.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/ssl_support.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/ssl_support.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/unicode_utils.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/unicode_utils.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/version.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/version.pyc exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/windows_support.py exists in filesystem
python2-setuptools: /usr/lib/python2.7/site-packages/setuptools/windows_support.pyc exists in filesystem
Errors occurred, no packages were upgraded.
后来我发现我的默认版本已经更改,并且还以某种方式指向anacondas版本。
➜ ~ which pip
/home/arvindh/.miniconda3/bin/pip
➜ ~ which python
python: aliased to /usr/bin/python2.7
➜ ~
我想将其更改为默认版本。请帮忙解决这个问题。
答案 0 :(得分:1)
首先从yaourt转移到pacaur。 建议使用Pacaur,请查看this以获取更多信息。
pacaur -S ros-kinetic-ros-core
应安装所有依赖项。
我看了PKGBUILD,看起来你需要Python 2.7才能运行它。
我怀疑those lines负责从python3到python2的更改
# Fix Python2/Python3 conflicts
/usr/share/ros-build-tools/fix-python-scripts.sh -v 2 ${srcdir}/${_dir} with the following into the PKGBUILD
所以你应该安装python2 pip
&& setuptools
:
pacman -S python2-pip python2-setuptools
根据您遇到此类问题的there:
python2-argparse: /usr/lib/python2.7/site-packages/argparse.py exists in filesystem
python2-argparse: /usr/lib/python2.7/site-packages/argparse.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/__init__.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/__init__.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/_common.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/_common.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/_version.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/_version.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/easter.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/easter.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/parser.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/parser.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/relativedelta.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/relativedelta.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/rrule.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/rrule.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/__init__.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/__init__.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/_common.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/_common.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/tz.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/tz.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/win.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tz/win.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tzwin.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/tzwin.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.pyc exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/zoneinfo/rebuild.py exists in filesystem
python2-dateutil: /usr/lib/python2.7/site-packages/dateutil/zoneinfo/rebuild.pyc exists in filesystem
python2-docutils: /usr/lib/python2.7/site-packages/docutils/__init__.py exists in filesystem
python2-docutils: /usr/lib/python2.7/site-packages/docutils/__init__.pyc exists in filesystem
python2-docutils: /usr/lib/python2.7/site-packages/docutils/_compat.py exists in filesystem
python2-docutils: /usr/lib/python2.7/site-packages/docutils/_compat.pyc exists in filesystem
你应该用
删除那些文件rm path/to/the/file
所以使用以下示例,您应该执行
rm /usr/lib/python2.7/site-packages/argparse.py
rm /usr/lib/python2.7/site-packages/argparse.pyc
rm /usr/lib/python2.7/site-packages/dateutil/__init__.py
rm /usr/lib/python2.7/site-packages/dateutil/__init__.pyc
rm /usr/lib/python2.7/site-packages/dateutil/_common.py
rm /usr/lib/python2.7/site-packages/dateutil/_common.pyc
rm /usr/lib/python2.7/site-packages/dateutil/_version.py
rm /usr/lib/python2.7/site-packages/dateutil/_version.pyc
rm /usr/lib/python2.7/site-packages/dateutil/easter.py
rm /usr/lib/python2.7/site-packages/dateutil/easter.pyc
rm /usr/lib/python2.7/site-packages/dateutil/parser.py
rm /usr/lib/python2.7/site-packages/dateutil/parser.pyc
rm /usr/lib/python2.7/site-packages/dateutil/relativedelta.py
rm /usr/lib/python2.7/site-packages/dateutil/relativedelta.pyc
rm /usr/lib/python2.7/site-packages/dateutil/rrule.py
rm /usr/lib/python2.7/site-packages/dateutil/rrule.pyc
rm /usr/lib/python2.7/site-packages/dateutil/tz/__init__.py
rm /usr/lib/python2.7/site-packages/dateutil/tz/__init__.pyc
rm /usr/lib/python2.7/site-packages/dateutil/tz/_common.py
rm /usr/lib/python2.7/site-packages/dateutil/tz/_common.pyc
rm /usr/lib/python2.7/site-packages/dateutil/tz/tz.py
rm /usr/lib/python2.7/site-packages/dateutil/tz/tz.pyc
rm /usr/lib/python2.7/site-packages/dateutil/tz/win.py
rm /usr/lib/python2.7/site-packages/dateutil/tz/win.pyc
rm /usr/lib/python2.7/site-packages/dateutil/tzwin.py
rm /usr/lib/python2.7/site-packages/dateutil/tzwin.pyc
rm /usr/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.py
rm /usr/lib/python2.7/site-packages/dateutil/zoneinfo/__init__.pyc
rm /usr/lib/python2.7/site-packages/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz
rm /usr/lib/python2.7/site-packages/dateutil/zoneinfo/rebuild.py
rm /usr/lib/python2.7/site-packages/dateutil/zoneinfo/rebuild.pyc
rm /usr/lib/python2.7/site-packages/docutils/__init__.py
rm /usr/lib/python2.7/site-packages/docutils/__init__.pyc
rm /usr/lib/python2.7/site-packages/docutils/_compat.py
rm /usr/lib/python2.7/site-packages/docutils/_compat.pyc
您应该执行命令列表there(它只是上面示例的应用程序,但包含重新安装前应删除的所有内容的列表。)
答案 1 :(得分:0)
您可以使用自制啤酒:brew install python
。它应该为您提供在完成时设置为默认值的选项。如果你想要python 3,只需brew install python3
。
答案 2 :(得分:0)
看起来你有linux所以运行这个命令。
alias python=python3
答案 3 :(得分:0)
该错误与ROS无关。
您可能尝试在全球范围内使用pip
进行本地安装,这就是说它存在冲突文件的原因。
解决此类错误的快速脏指南:
pacman -S --force python2-setuptools
pacman -Rdd python2-setuptools
pacman -S python2-setuptools
希望这能解决它。