0

Today I updated my macOS to 10.14.5. After that, I can't do virtualenv like below.

How do I do easy_install --user during virtualenv is working?

I think some directory's permissions are broken by OS update...

Does anyone have suggestions?

mkvirtualenv -p python3 proj_name
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/myname/proj_name/bin/python3.6
Not overwriting existing python script /Users/myname/proj_name/bin/python (you must use /Users/myname/proj_name/bin/python3.6)
Please make sure you remove any previous custom paths from your /Users/myname/.pydistutils.cfg file.
Installing setuptools, pip, wheel...

  Complete output from command /Users/myname/proj_name/bin/python3.6 - setuptools pip wheel:
  Looking in links: /Users/myname/Library/Python/3.6/lib/python/site-packages/virtualenv_support
Collecting setuptools
Collecting pip
Collecting wheel
Installing collected packages: setuptools, pip, wheel
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/lib/python3.6/site-packages/easy_install.py'
Consider using the `--user` option or check the permissions.

OSError: Command /Users/myname/proj_name/bin/python3.6 - setuptools pip wheel failed with error code 1
naohide_a
  • 1,116
  • 2
  • 13
  • 30
  • What are you trying to do exactly? I'm a bit confused, Do you want to activate a virtual environment or want to create one? – Jay Patel May 23 '19 at 09:14
  • Have you tried to using `sudo` before the command? – Sang Huynh May 23 '19 at 09:14
  • @JayPatel want to create one – naohide_a May 23 '19 at 09:16
  • I don't think so it's happening due to OS update, I updated my os yesterday to the same version and I'm able to create a new environment without any problem! – Jay Patel May 23 '19 at 09:18
  • @SangHuynh Yes, I tried. had similar error `Could not install packages due to an EnvironmentError: [Errno 1] Operation not permitted: '/bin/easy_install'` – naohide_a May 23 '19 at 09:18
  • 1
    Possible duplicate of [Errno 13 Permission denied when running virtualenv](https://stackoverflow.com/questions/53913862/errno-13-permission-denied-when-running-virtualenv) – phd May 23 '19 at 10:13
  • https://stackoverflow.com/search?q=%5Bvirtualenv%5D+ERROR%3A+Could+not+install+packages+due+to+an+EnvironmentError%3A+Errno+13+Permission+denied+lib – phd May 23 '19 at 10:13
  • @phd Thank you. worked for me by your advice. https://stackoverflow.com/questions/27465413/python-pip-tries-to-install-to-bin-directory – naohide_a May 24 '19 at 01:17

1 Answers1

0

It looks like you are trying to install a package to a system folder which you don't have permission to. Try using pip install --user virtualenv, activate the virtualenv and run the command.

Arjun V
  • 197
  • 4
  • 16