Установка virtualenv virtualenvwrapper с pip на osx 10.11.1

Задача

Установить virtualenv virtualenvwrapper

Фон

Я пытаюсь создать образец приложения для колб, следуя этому руководствуhttps://realpython.com/blog/python/flask-by-example-part-1-project-setup/

Но я сталкиваюсь с постоянными проблемами, так как я настраиваю Python и связанные технологии на этом новом Mac, работающем на 10.11.1

Я застрял в команде, где я ввожу это

$ mkvirtualenv --python = / usr / local / bin / python3 wordcounts

Позже я понял, что у меня не было Python 3. Но все же у меня есть ошибка

-bash: mkvirtualenv: command not found

Так что я нашел этот учебник, чтобы помочь установить virtualenvУстановите virtualenv и virtualenvwrapper на Mac OS X и он сказал, чтобы запустить это

pip install virtualenv virtualenvwrapper

Но потом я столкнулся с проблемой с пипс

Текущее состояние

Я думал, что нашел существующий ответ наНе могу установить virtualenvwrapper на OSX 10.11 El Capitan

Ответ сказал

sudo pip install pbr
sudo pip install --no-deps stevedore
sudo pip install --no-deps virtualenvwrapper

но даже другой пользователь упомянул в комментариях принятый ответ, что он не работает на10.11.1

бревна
Captains-MacBook-Pro:flask-by-example mac$ sudo pip install pbr
Password:
The directory '/Users/mac/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/mac/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.
Requirement already satisfied (use --upgrade to upgrade): pbr in /Library/Python/2.7/site-packages
Captains-MacBook-Pro:flask-by-example mac$ sudo pip install --no-deps stevedore
The directory '/Users/mac/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/mac/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 stevedore
  Downloading stevedore-1.9.0-py2.py3-none-any.whl
Installing collected packages: stevedore
Successfully installed stevedore-1.9.0
Captains-MacBook-Pro:flask-by-example mac$ sudo pip install --no-deps virtualenvwrapper
The directory '/Users/mac/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/mac/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 virtualenvwrapper
  Downloading virtualenvwrapper-4.7.1-py2.py3-none-any.whl
Installing collected packages: virtualenvwrapper
Successfully installed virtualenvwrapper-4.7.1
Captains-MacBook-Pro:flask-by-example mac$ sudo pip install virtualenv virtualenvwrapper
The directory '/Users/mac/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/mac/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.
Requirement already satisfied (use --upgrade to upgrade): virtualenv in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenvwrapper in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): virtualenv-clone in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): stevedore in /Library/Python/2.7/site-packages (from virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): pbr>=1.6 in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper)
Requirement already satisfied (use --upgrade to upgrade): argparse in /Library/Python/2.7/site-packages (from stevedore->virtualenvwrapper)
Collecting six>=1.9.0 (from stevedore->virtualenvwrapper)
  Downloading six-1.10.0-py2.py3-none-any.whl
Installing collected packages: six
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-tK4FXO-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
Captains-MacBook-Pro:flask-by-example mac$