How to install Ansible 2.4.x with Brew on MacOS Sierra - pip

brew install ansible installs the current version of Ansible (2.5.x as of this writing). I have an application that requires version 2.4, and does not work with earlier or later versions. brew search ansible results in the following:
==> Searching local taps...
ansible โœ” ansible-lint ansible#2.0
ansible-cmdb ansible#1.9 terraform-provisioner-ansible
==> Searching taps on GitHub...
homebrew/cask/ansible-dk
==> Searching blacklisted, migrated and deleted formulae...
Installing ansible#2.0 gives me version 2.3.
How do you install version 2.4?
Attempting to install with easy_install + pip results in this which is reportedly caused by a TLS bug with MacOS Sierra 10.12.
โžœ ~ sudo easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')

This is the way I have in my Mac:
First install python with brew: brew install python. This will install python 3.6.5:
==> Downloading https://homebrew.bintray.com/bottles/python-3.6.5.high_sierra.bottle.1.tar.gz
Already downloaded: /Users/imjoseangel/Library/Caches/Homebrew/python-3.6.5.high_sierra.bottle.1.tar.gz
==> Pouring python-3.6.5.high_sierra.bottle.1.tar.gz
==> /usr/local/Cellar/python/3.6.5/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/
==> /usr/local/Cellar/python/3.6.5/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/
==> /usr/local/Cellar/python/3.6.5/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/
==> Caveats
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin
If you need Homebrew's Python 2.7 run
brew install python#2
Pip, setuptools, and wheel have been installed. To update them run
pip3 install --upgrade pip setuptools wheel
You can install Python packages with
pip3 install <package>
They will install into the site-package directory
/usr/local/lib/python3.6/site-packages
See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
๐Ÿบ /usr/local/Cellar/python/3.6.5: 4,736 files, 99.2MB
From there, install virtualenv with pip3 install virtualenv:
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl
Installing collected packages: virtualenv
Found existing installation: virtualenv 16.0.0
Uninstalling virtualenv-16.0.0:
Successfully uninstalled virtualenv-16.0.0
Successfully installed virtualenv-16.0.0
Create your environment with virtualenv ansible24
Using base prefix '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/imjoseangel/Source/ansible24/bin/python3.6
Also creating executable in /Users/imjoseangel/Source/ansible24/bin/python
Installing setuptools, pip, wheel...done.
Activate your environment - source ansible24/bin/activate
And Install Ansible 2.4 - pip install ansible==2.4.0
Collecting ansible==2.4.0
Downloading https://files.pythonhosted.org/packages/1e/7c/385ccbeb0fbefc13eaef53df76e42ef778170bdfe5fd425879735b43106e/ansible-2.4.0.0.tar.gz (6.6MB)
100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 6.6MB 4.3MB/s
Collecting jinja2 (from ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting PyYAML (from ansible==2.4.0)
Collecting paramiko (from ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/3e/db/cb7b6656e0e7387637ce850689084dc0b94b44df31cc52e5fc5c2c4fd2c1/paramiko-2.4.1-py2.py3-none-any.whl
Collecting cryptography (from ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/40/87/acdcf84ce6d25a7db1c113f4b9b614fd8d707b7ab56fbf17cf18cd26a627/cryptography-2.2.2-cp34-abi3-macosx_10_6_intel.whl
Requirement already satisfied: setuptools in ./ansible24/lib/python3.6/site-packages (from ansible==2.4.0) (39.2.0)
Collecting MarkupSafe>=0.23 (from jinja2->ansible==2.4.0)
Collecting pyasn1>=0.1.7 (from paramiko->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl
Collecting bcrypt>=3.1.3 (from paramiko->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/7e/59/d48fd712941da1a5d6490964a37bb3de2e526965b6766273f6a7049ee590/bcrypt-3.1.4-cp36-cp36m-macosx_10_6_intel.whl
Collecting pynacl>=1.0.1 (from paramiko->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/74/8e/a6c0d340972d9e2f1a405aaa3f2460950b4c0337f92db0291a4355974529/PyNaCl-1.2.1-cp36-cp36m-macosx_10_6_intel.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/8e/be/40b1bc2c3221acdefeb9dab6773d43cda7543ed0d8c8df8768f05af2d01e/cffi-1.11.5-cp36-cp36m-macosx_10_6_intel.whl
Collecting asn1crypto>=0.21.0 (from cryptography->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting idna>=2.1 (from cryptography->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting six>=1.4.1 (from cryptography->ansible==2.4.0)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible==2.4.0)
Building wheels for collected packages: ansible
Running setup.py bdist_wheel for ansible ... done
Stored in directory: /Users/imjoseangel/Library/Caches/pip/wheels/ea/e1/f4/f5654529457978b69c0369212794664b88b51c95fa267346ea
Successfully built ansible
Installing collected packages: MarkupSafe, jinja2, PyYAML, pyasn1, pycparser, cffi, asn1crypto, idna, six, cryptography, bcrypt, pynacl, paramiko, ansible
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.4.0.0 asn1crypto-0.24.0 bcrypt-3.1.4 cffi-1.11.5 cryptography-2.2.2 idna-2.6 jinja2-2.10 paramiko-2.4.1 pyasn1-0.4.3 pycparser-2.18 pynacl-1.2.1 six-1.11.0

Related

installing imblearn on jupyter notebook anaconda

I have been trying to install imblearn on jupyter for some time.
I run to the error:
!pip install imblearn --ignore-installed scikit-learn
collecting imblearn
Using cached https://files.pythonhosted.org/packages/81/a7/4179e6ebfd654bd0eac0b9c06125b8b4c96a9d0a8ff9e9507eb2a26d2d7e/imblearn-0.0-py2.py3-none-any.whl
Collecting scikit-learn
Using cached https://files.pythonhosted.org/packages/9d/20/0ffe8665a44bce7616bd33d4368a198fecad3b226bcafa38c63ef0f6286f/scikit_learn-1.0.2-cp37-cp37m-win_amd64.whl
Collecting imbalanced-learn (from imblearn)
Using cached https://files.pythonhosted.org/packages/19/79/e86c8fd859dca4fb1fbfc61376afc63210177a235a7bfbe7219b02edf8f3/imbalanced_learn-0.9.1-py3-none-any.whl
Collecting threadpoolctl>=2.0.0 (from scikit-learn)
Using cached https://files.pythonhosted.org/packages/61/cf/6e354304bcb9c6413c4e02a747b600061c21d38ba51e7e544ac7bc66aecc/threadpoolctl-3.1.0-py3-none-any.whl
Collecting joblib>=0.11 (from scikit-learn)
Using cached https://files.pythonhosted.org/packages/3e/d5/0163eb0cfa0b673aa4fe1cd3ea9d8a81ea0f32e50807b0c295871e4aab2e/joblib-1.1.0-py2.py3-none-any.whl
Collecting scipy>=1.1.0 (from scikit-learn)
Using cached https://files.pythonhosted.org/packages/40/69/4af412d078cef2298f7d90546fa0e03e65a032558bd85319239c72ae0c3c/scipy-1.7.3-cp37-cp37m-win_amd64.whl
Collecting numpy>=1.14.6 (from scikit-learn)
Using cached https://files.pythonhosted.org/packages/97/9f/da37cc4a188a1d5d203d65ab28d6504e17594b5342e0c1dc5610ee6f4535/numpy-1.21.6-cp37-cp37m-win_amd64.whl
Installing collected packages: numpy, scipy, threadpoolctl, joblib, scikit-learn, imbalanced-learn, imblearn
i have tried to upgrade my scikit-learn version to 1.1.0 that also returned an error that this is not availble .
i also tried to run this on the command prompt:
(base) C:\Users\agns1>pip install imblearn on anaconda pip install imblearn
Collecting imblearn
Using cached https://files.pythonhosted.org/packages/81/a7/4179e6ebfd654bd0eac0b9c06125b8b4c96a9d0a8ff9e9507eb2a26d2d7e/imblearn-0.0-py2.py3-none-any.whl
Collecting on
Downloading https://files.pythonhosted.org/packages/ec/8a/a19679d9e009f8eeedce74fdcc252c5a5c834b30f98c4c13a3a93ff92842/on-0.0.4-py3-none-any.whl (47kB)
|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 51kB 469kB/s
Collecting anaconda
Downloading https://files.pythonhosted.org/packages/bd/81/44690deb604d72ffa59ec6e5552f4ef21afb59c8e2698717c8a6be4af09c/anaconda-0.0.1.1.tar.gz
Requirement already satisfied: pip in c:\users\agns1\anaconda3\lib\site-packages (19.2.3)
Collecting install
Downloading https://files.pythonhosted.org/packages/4d/c8/8cbca135f9e167810756ea2bc34b028501936675fcbd7dadccf752fa4622/install-1.3.5-py3-none-any.whl
Collecting imbalanced-learn (from imblearn)
Using cached https://files.pythonhosted.org/packages/19/79/e86c8fd859dca4fb1fbfc61376afc63210177a235a7bfbe7219b02edf8f3/imbalanced_learn-0.9.1-py3-none-any.whl
Requirement already satisfied: joblib>=1.0.0 in c:\users\agns1\anaconda3\lib\site-packages (from imbalanced-learn->imblearn) (1.1.0)
Collecting numpy>=1.17.3 (from imbalanced-learn->imblearn)
Using cached https://files.pythonhosted.org/packages/97/9f/da37cc4a188a1d5d203d65ab28d6504e17594b5342e0c1dc5610ee6f4535/numpy-1.21.6-cp37-cp37m-win_amd64.whl
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\agns1\anaconda3\lib\site-packages (from imbalanced-learn->imblearn) (3.1.0)
Collecting scikit-learn>=1.1.0 (from imbalanced-learn->imblearn)
ERROR: Could not find a version that satisfies the requirement scikit-learn>=1.1.0 (from imbalanced-learn->imblearn) (from versions: 0.9, 0.10, 0.11, 0.12, 0.12.1, 0.13, 0.13.1, 0.14, 0.14.1, 0.15.0b1, 0.15.0b2, 0.15.0, 0.15.1, 0.15.2, 0.16b1, 0.16.0, 0.16.1, 0.17b1, 0.17, 0.17.1, 0.18, 0.18.1, 0.18.2, 0.19b2, 0.19.0, 0.19.1, 0.19.2, 0.20rc1, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.20.4, 0.21rc2, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22rc2.post1, 0.22rc3, 0.22, 0.22.1, 0.22.2, 0.22.2.post1, 0.23.0rc1, 0.23.0, 0.23.1, 0.23.2, 0.24.dev0, 0.24.0rc1, 0.24.0, 0.24.1, 0.24.2, 1.0rc1, 1.0rc2, 1.0, 1.0.1, 1.0.2)
ERROR: No matching distribution found for scikit-learn>=1.1.0 (from imbalanced-learn->imblearn)
(base) C:\Users\agns1>scikit-learn
ERROR: imbalanced-learn 0.9.1 has requirement scikit-learn>=1.1.0, but you'll have scikit-learn 1.0.2 which is incompatible.
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\\Users\\agns1\\Anaconda3\\Lib\\site-packages\\numpy\\.libs\\libopenblas.XWYDX2IKJW2NMTWSFYNGFUWKQU3LYTCZ.gfortran-win_amd64.dll'
Consider using the `--user` option or check the permissions.
it also returned an error is there any way to install imblearn in order to use the SMOTE from it ?
thank you:)
Conda is throwing an environment error that basically says: "you cannot upgrade scikit-learn because you do not have permission to update libopenblas."
The easiest fix would be to create a new environment and install a fresh set of dependencies:
conda create -y -n imblearn python=3.9
conda activate imblearn
python -m pip install imbalanced-learn
Fixing the permission error in the base environment is a different matter. Reinstalling conda might be the easiest option. The conda getting started guide should be helpful for these points:
https://conda.io/projects/conda/en/latest/user-guide/getting-started.html

How to force pip install a package compiling it (no binary) but using a previous specific version

I'm trying something like this:
pip install -U --no-cache-dir --force-reinstall --ignore-installed --no-binary :all: pysam==0.15.4
Collecting pysam==0.15.4
Downloading pysam-0.15.4.tar.gz (1.6 MB)
|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 1.6 MB 455 kB/s
Skipping wheel build for pysam, due to binaries being disabled for it.
Installing collected packages: pysam
Running setup.py install for pysam ... done
Successfully installed pysam-0.16.0.1
after a while, where things are being compiled, I got version 0.16.0.1 (the latest) and I don't what that!

OpenVino on MacOS using Anaconda

How do you go about installing OpenVino using Anaconda. Will this be possible with prerequisites like OpenCV and CMake that are required for installation.
(IntelEnv) ChrNinja#ChrNinja demo % ./demo_squeezenet_download_convert_run.sh
target_precision = FP16
[setupvars.sh] OpenVINO environment initialized
###################################################
Downloading the Caffe model and the prototxt
Installing dependencies
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing /Users/christianh/Library/Caches/pip/wheels/a7/c1/ea/cf5bd31012e735dc1dfea3131a2d5eae7978b251083d6247bd/PyYAML-5.3.1-cp27-cp27m-macosx_10_15_x86_64.whl
Collecting requests
Using cached https://files.pythonhosted.org/packages/1a/70/1935c770cb3be6e3a8b78ced23d7e0f3b187f5cbfab4749523ed65d7c9b1/requests-2.23.0-py2.py3-none-any.whl
Collecting idna<3,>=2.5
Using cached https://files.pythonhosted.org/packages/89/e3/afebe61c546d18fb1709a61bee788254b40e736cff7271c7de5de2dc4128/idna-2.9-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17
Using cached https://files.pythonhosted.org/packages/57/2b/26e37a4b034800c960a00c4e1b3d9ca5d7014e983e6e729e33ea2f36426c/certifi-2020.4.5.1-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Using cached https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl
Installing collected packages: pyyaml, idna, chardet, certifi, urllib3, requests
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/PyYAML-5.3.1.dist-info'
Consider using the `--user` option or check the permissions.
Error on or near line 150; exiting with status 1
1. Update conda to latest version:
conda update --all
2. Install the Intelยฎ Distribution of OpenVINOโ„ข Toolkit:
conda install openvino-ie4py -c openvino
3. Install OpenCV. This is required to run a sample:
conda install opencv
4. Verify the package installed:
python -c โ€œimport openvinoโ€

Has virtualenv installed correctly when `pip install virtualenv` outputs `using cached virtualenv`?

Context: Am working on the flaskr web project on Mac OS High Sierra.
Am at stage of installing Flask and I am running into issues with installing virtualenv: http://flask.pocoo.org/docs/0.12/tutorial/packaging/
When running the following line in Terminal:
pip install virtualenv
I get:
pip install virtualenv
Collecting virtualenv
Using cached virtualenv-15.2.0-py2.py3-none-any.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy
1.8.0rc1 which is incompatible.
Installing collected packages: virtualenv
I was expecting a response 'successfully installed virtualenv...' as appears in this video: https://youtu.be/-COGZITgHtw?t=1m9s.
Then, when running the following in Terminal:
virtualenv
I get:
-bash: virtualenv: command not found
I note others have had issues with โ€˜command not foundโ€™ (bash: pip: command not found, How to add virtualenv to path) but I cannot seem to find outputs which mirror what I have received.
Is the cached virtualenv holding things up? Or perhaps the matplotlib stuff? Either way, virtualenv doesn't appear to have installed as it ought.
Would it be wise (in any case) to update or install nose, tornado and numpy using pip so that I can progress to activating a virtualenv? Or is something I need to address first before I can get virtuanlenv to start working?
I did the same error, but succeeded with the following procedure.
$ brew install python3
$ pip3 install --upgrade virtualenv
Collecting virtualenv
Cache entry deserialization failed, entry ignored
Cache entry deserialization failed, entry ignored
Downloading virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 2.6MB 226kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-15.2.0

brew or pip - install credstash - errors - No named formulae found in taps / OSErr six-1.4.1-py2.7.egg-info operation not permitted

Getting the following error on my Mac Terminal window.
$ pip --version
pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7)
Python version is 2.7.10
While trying to install credstash using brew, I'm getting the following error.
$ `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.
Got the similar error, when I tried to install pip3 using brew.
Tried installing credstash from pip but that errored out as well.
[arun#MacBook-Pro-2 ~/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'
IF I don't use sudo in the above command, then I get the following exception error:
OSError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/concurrent'
To get latest pip, as pip is provided via python on macOS, if I try to install python using brew, I'm getting the following, poking into it how I can remove Xcode first:
$ 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)
As I thought I have an older pip version, I download this file:
$ wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
Which successfully installed a newer version of pip. Now showing:
$ pip --version
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)
Retried doing pip install credstash but still getting the same error (with or without sudo).
I tried the following to get credstash installed.
Downloaded Python3 Mac binary from here.
https://www.python.org/ftp/python/3.5.2/python-3.5.2-macosx10.6.pkg
Installed the .pkg file GUI way.
Opened a Terminal window in Mac.
[arun#MacBook-Pro-2 /tmp] $ which pip
/usr/local/bin/pip
[arun#MacBook-Pro-2 /tmp] $ pip --version
pip 9.0.1 from /Library/Python/2.7/site-packages (python 2.7)
[arun#MacBook-Pro-2 /tmp] $ which python
/usr/bin/python
[arun#MacBook-Pro-2 /tmp] $ python --version
Python 2.7.10
[arun#MacBook-Pro-2 /tmp] $ which python3
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3
[arun#MacBook-Pro-2 /tmp] $ python3 --version
Python 3.5.2
[arun#MacBook-Pro-2 /tmp] $ which pip3
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip3
[arun#MacBook-Pro-2 /tmp] $ pip3 --version
pip 8.1.1 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)
[arun#MacBook-Pro-2 /tmp] $
[arun#MacBook-Pro-2 /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.
[arun#MacBook-Pro-2 /tmp] $
[arun#MacBook-Pro-2 /tmp] $ which credstash
/Library/Frameworks/Python.framework/Versions/3.5/bin/credstash
[arun#MacBook-Pro-2 /tmp] $
If you're trying to install to system Python then you need sudo. If you want to just play around, look into creating a virtualenv and install there. http://docs.python-guide.org/en/latest/dev/virtualenvs/

Resources