Não é possível instalar tensorflow com pip3, alterna para python2

1

Estou tentando instalar o fluxo do tensor usando pip3 install tensorflow-gpu

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 9, in <module>
    load_entry_point('pip==9.0.1', 'console_scripts', 'pip3')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load
    return self.resolve()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/__init__.py", line 28, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/vcs/subversion.py", line 9, in <module>
    from pip.index import Link
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/index.py", line 31, in <module>
    from pip.wheel import Wheel, wheel_ext
  File "/usr/local/lib/python3.5/dist-packages/pip-9.0.1-py3.5.egg/pip/wheel.py", line 6, in <module>
    import compileall
  File "/usr/lib/python3.5/compileall.py", line 20, in <module>
    from concurrent.futures import ProcessPoolExecutor
  File "/usr/lib/python2.7/dist-packages/concurrent/futures/__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "/usr/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 357
    raise type(self._exception), self._exception, self._traceback
                               ^
SyntaxError: invalid syntax

Os sistemas parecem confundir as bibliotecas de python3 e python2 ao usar o pip3. A instalação funciona para pyhton2 usando pip install tensorflow-gpu .

Editar 1

Eu tentei python3 -m pip install tensorflow-gpu , mas a última biblioteca ainda é python2.

/usr/lib/python2.7/dist-packages/concurrent/futures/_base.py

Editar 2

Eu tentei isso de novo e descobri que, como eu tenho o ROS instalado, ele define o PYTHONPATH como python 2. Então, tive que modificar o bash de configuração para o ROS, então o PYTHONPATH foi definido por mim e não pelo ROS.

    
por Luis 27.07.2017 / 12:47

0 respostas