1

When I try to install TensorFlow through pip, I get the following warning which I want to get rid of.

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py2-none-any.whl
sudo pip  install --upgrade TF_BINARY_URL

The warning message

The directory '/Users/nn/Library/Caches/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 '/Users/nn/Library/Caches/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.
Collecting TF_BINARY_URL
  Could not find a version that satisfies the requirement TF_BINARY_URL (from versions: )
No matching distribution found for TF_BINARY_URL

should I give all permissions to the Library/Caches/pip directory?

Nick_inaw
  • 145
  • 3
  • 13
  • 1
    You shouldn't use `sudo` while using `pip`. Not only is it a security risk (because it allows **arbitrary code execution from user-managed files**, as [this question](https://askubuntu.com/questions/802544/is-sudo-pip-install-still-a-broken-practice) goes into), but python is often installed on your system natively, and managing the system's install (instead of the users install) with a third part tool can be ill advised, as some answeres [here](https://stackoverflow.com/questions/21055859/what-are-the-risks-of-running-sudo-pip) discuss. – Mark Feb 21 '17 at 04:01
  • Tried this. nn-MacBook-Pro-3:~ nn$ pip install Image nn-MacBook-Pro-3:~ nn$ python Python 2.7.6 (default, Sep 9 2014, 15:04:36) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import image Traceback (most recent call last): File "", line 1, in ImportError: No module named image – Nick_inaw Feb 21 '17 at 04:04
  • Please post your second question has a separate question. – Franck Dernoncourt Feb 21 '17 at 04:33
  • 1
    @FranckDernoncourt Sure. Done. – Nick_inaw Feb 21 '17 at 06:08
  • @Nick_inaw Thanks – Franck Dernoncourt Feb 21 '17 at 06:10

0 Answers0