Когда я пытаюсь установить пакет tenorflow с pip3 в Ubuntu 16.04, я получаю это сообщение об ошибке:
The directory '/home/federico/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/federico/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. tensorflow-0.7.1-cp34-none-linux_x86_64.whl is not a supported wheel on this platform.
Как мне решить проблему?
Проблема - то, что Ubuntu 16 использует Python3.5, но Tensorflow только обеспечивает колесо для Python 3.4 (обозначенный 'cp34' в "tensorflow-0.7.1-cp34-none-linux_x86_64.whl"). К счастью Колесо на самом деле совместимо с Python 3.5, таким образом, Вы не должны компилировать из источника.
необходимо загрузить колесо, переименовать его, чтобы препятствовать тому, чтобы проверка python 3.4 перестала работать и затем установила путем передачи переименованного файла для побеждения.
Для текущей версии Tensorflow (взгляды в будущем, проверьте веб-сайт на последнюю версию и адаптируйте команды ниже при необходимости), выполненный:
wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl
mv tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl tensorflow-0.8.0-cp35-none-linux_x86_64.whl
pip install tensorflow-0.8.0-cp35-none-linux_x86_64.whl
используйте зернышко---для python2 pip3 - чтобы python3 возобновление использовало sudo
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.10.0-cp35-cp35m-linux_x86_64.whl