2016-12-16 1 views
2

Получение следующей ошибки в окне моего терминала Mac.brew или pip - install credstash - errors - Не найдено именных формул в кранах/Операция OSErr six-1.4.1-py2.7.egg-info не разрешена

$ pip --version 
pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7) 

Python версии 2.7.10

При попытке установить credstash используя отвар, я получаю следующее сообщение об ошибке.

$ `which python` --version && brew update && brew install credstash 
Python 2.7.10 
Already up-to-date. 
Error: No available formula with the name "credstash" 
==> Searching for similarly named formulae... 
Error: No similarly named formulae found. 
==> Searching taps... 
Error: No formulae found in taps. 

Полученная аналогичная ошибка, когда я попытался установить pip3 с использованием варева.

Пробовал устанавливать credstash от pip но это ошибка за пределами.

[[email protected] ~/aks/wspace] $ pip install credstash 
You are using pip version 6.1.1, however version 9.0.1 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
Collecting credstash 
    Using cached credstash-1.12.0.tar.gz 
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6.1 in /Library/Python/2.7/site-packages (from credstash) 
Collecting boto3>=1.1.1 (from credstash) 
    Using cached boto3-1.4.2-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from boto3>=1.1.1->credstash) 
Collecting botocore<1.5.0,>=1.4.1 (from boto3>=1.1.1->credstash) 
    Using cached botocore-1.4.87-py2.py3-none-any.whl 
Collecting s3transfer<0.2.0,>=0.1.0 (from boto3>=1.1.1->credstash) 
    Using cached s3transfer-0.1.10-py2.py3-none-any.whl 
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Using cached python_dateutil-2.6.0-py2.py3-none-any.whl 
Collecting docutils>=0.10 (from botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Using cached docutils-0.13.1-py2-none-any.whl 
Collecting futures<4.0.0,>=2.2.0 (from s3transfer<0.2.0,>=0.1.0->boto3>=1.1.1->credstash) 
    Using cached futures-3.0.5-py2-none-any.whl 
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Installing collected packages: six, python-dateutil, docutils, botocore, futures, s3transfer, boto3, credstash 
    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/basecommand.py", line 246, in main 
      status = self.run(options, args) 
     File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 352, in run 
      root=options.root_path, 
     File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 687, in install 
      requirement.uninstall(auto_confirm=True) 
     File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 730, in uninstall 
      paths_to_remove.remove(auto_confirm) 
     File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 126, in remove 
      renames(path, new_path) 
     File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 292, 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: '/var/folders/z5/37m4q63j3bn48y3dxgf40tdm0000gn/T/pip-LMRqSS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

Если я не использую Sudo в команде выше, то я получаю следующее сообщение об ошибке исключения:

OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/concurrent' 

Чтобы получить последний пип, пип, как обеспечивается с помощью питона на MacOS, если я попробуйте установить питон, используя отвар, я получаю следующее, тыкая в него, как я могу удалить Xcode первым:

$ brew install python 
Error: Your Xcode (5.0.2) is too outdated. 
Please update to Xcode 8.2 (or delete it). 
Xcode can be updated from the App Store. 

$ pip --version 
pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7) 

как я думал, что у меня есть старая версия пипа, загрузить этот файл:

$ wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py 

Какая успешно установлена ​​новая версия пипса. Сейчас показано:

$ pip --version 
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7) 

повторен делать пип установить credstash, но все еще получаю ту же ошибку (с или без Sudo).

ответ

2

Я попробовал следующее, чтобы получить credstash установлен.

Скачан Python3 Mac отсюда.

https://www.python.org/ftp/python/3.5.2/python-3.5.2-macosx10.6.pkg 

Установлен графический интерфейс файла .pkg.

Открыть окно терминала в Mac.

[[email protected] /tmp] $ which pip 
/usr/local/bin/pip 

[[email protected] /tmp] $ pip --version 
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7) 

[[email protected] /tmp] $ which python 
/usr/bin/python 

[[email protected] /tmp] $ python --version 
Python 2.7.10 

[[email protected] /tmp] $ which python3 
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3 

[[email protected] /tmp] $ python3 --version 
Python 3.5.2 

[[email protected] /tmp] $ which pip3 
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip3 

[[email protected] /tmp] $ pip3 --version 
pip 8.1.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5) 
[[email protected] /tmp] $ 

[[email protected] /tmp] $ pip3 install credstash 
Collecting credstash 
    Using cached credstash-1.12.0.tar.gz 
Collecting pycrypto>=2.6.1 (from credstash) 
    Using cached pycrypto-2.6.1.tar.gz 
Collecting boto3>=1.1.1 (from credstash) 
    Using cached boto3-1.4.2-py2.py3-none-any.whl 
Collecting s3transfer<0.2.0,>=0.1.0 (from boto3>=1.1.1->credstash) 
    Using cached s3transfer-0.1.10-py2.py3-none-any.whl 
Collecting botocore<1.5.0,>=1.4.1 (from boto3>=1.1.1->credstash) 
    Using cached botocore-1.4.87-py2.py3-none-any.whl 
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.1.1->credstash) 
    Using cached jmespath-0.9.0-py2.py3-none-any.whl 
Collecting docutils>=0.10 (from botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Downloading docutils-0.13.1-py3-none-any.whl (536kB) 
    100% |████████████████████████████████| 542kB 1.3MB/s 
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Using cached python_dateutil-2.6.0-py2.py3-none-any.whl 
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.5.0,>=1.4.1->boto3>=1.1.1->credstash) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Installing collected packages: pycrypto, docutils, six, python-dateutil, jmespath, botocore, s3transfer, boto3, credstash 
    Running setup.py install for pycrypto ... done 
    Running setup.py install for credstash ... done 
Successfully installed boto3-1.4.2 botocore-1.4.87 credstash-1.12.0 docutils-0.13.1 jmespath-0.9.0 pycrypto-2.6.1 python-dateutil-2.6.0 s3transfer-0.1.10 six-1.10.0 
You are using pip version 8.1.1, however version 9.0.1 is available. 
You should consider upgrading via the 'pip install --upgrade pip' command. 
[[email protected] /tmp] $ 
[[email protected] /tmp] $ which credstash 
/Library/Frameworks/Python.framework/Versions/3.5/bin/credstash 
[[email protected] /tmp] $ 
+0

работает для меня, спасибо. – aircraft

1

Если вы пытаетесь установить систему на Python, вам нужно sudo. Если вы хотите просто поиграть, загляните в создание virtualenv и установите там. http://docs.python-guide.org/en/latest/dev/virtualenvs/

+1

классный, у меня никогда не было шанса поиграть с virtualenv, но теперь я обязательно попробую. –

+0

Это работало для меня 'sudo -H pip install credstash' на OSX – vikas027

Смежные вопросы