0

When I want to install TensorFlow with Virtualenv, I meet a problem:

ImportError: No module named pkg_resources

I want to fix this problem with this solution.

But when I code like this

sudo curl https://bootstrap.pypa.io/ez_setup.py | python

I meet another problem:

error: [Errno 13] Permission denied: '/Users/sunny/anaconda/lib/python3.6/site-packages/easy-install.pth''

My system is Mac OS.

tupui
  • 5,738
  • 3
  • 31
  • 52
YuSong
  • 1
  • 1
  • https://www.tensorflow.org/install/install_mac#installing_with_virtualenv – Ishant Mrinal Aug 10 '17 at 16:21
  • Your `sudo` is applying to `curl`, not `python`. Thus, the `python` invocation is running unprivileged. – Charles Duffy Aug 10 '17 at 16:24
  • 1
    **Normally**, that's fine: In general, you shouldn't use `sudo` at all when installing to a virtualenv inside your home directory -- not needing to escalate privileges is part of the point. However, since you used `sudo` for it once in the past, you now need to do so again going forward, until you `chown` all the relevant files back to yourself, rather than being owned by root (as running an install with `sudo` would have left them). – Charles Duffy Aug 10 '17 at 16:25
  • In the interim: `sudo chown -R sunny /Users/sunny/anaconda` will switch files under that directory back to be owned by yourself again. And don't use `sudo` again for installations into that location in the future. – Charles Duffy Aug 10 '17 at 16:26

0 Answers0