Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing B2 Command Line on MacOS High Sierra #587

Open
JRC234 opened this issue Aug 27, 2019 · 4 comments
Open

Error installing B2 Command Line on MacOS High Sierra #587

JRC234 opened this issue Aug 27, 2019 · 4 comments

Comments

@JRC234
Copy link

JRC234 commented Aug 27, 2019

I'm not very familiar with command line use or terminal, just enough to cut/paste from instructions, but since I'm going to add B2 to my account I thought tje command line tool should be added to my account. I followed the installation instructions on: https://www.backblaze.com/b2/docs/quick_command_line.html
down through the "ignore-installed" work around but still get an error.

What should I do now? If I upgraded to Mojave before installing would that solve it?

Here is a transcript from Terminal when trying to install B2 command line tool:

[John-Office:~] john% sudo easy_install pip
Password:
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 19.2.3
Downloading https://files.pythonhosted.org/packages/00/9e/4c83a0950d8bdec0b4ca72afd2f9cea92d08eb7c1a768363f2ea458d08b4/pip-19.2.3.tar.gz#sha256=e7a31f147974362e6c82d84b91c7f2bdf57e4d3163d3d454e6c3e71944d67135
Processing pip-19.2.3.tar.gz
Writing /tmp/easy_install-lqWrgs/pip-19.2.3/setup.cfg
Running pip-19.2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-lqWrgs/pip-19.2.3/egg-dist-tmp-mnWggw
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
warning: no files found matching 'docs/docutils.conf'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'tox.ini'
warning: no files found matching 'Makefile' under directory 'docs'
warning: no files found matching '.bat' under directory 'docs'
warning: no previously-included files found matching 'src/pip/_vendor/six'
warning: no previously-included files found matching 'src/pip/_vendor/six/moves'
warning: no previously-included files matching '
.pyi' found under directory 'src/pip/_vendor'
no previously-included directories found matching '.github'
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'news'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
no previously-included directories found matching 'tools'
creating /Library/Python/2.7/site-packages/pip-19.2.3-py2.7.egg
Extracting pip-19.2.3-py2.7.egg to /Library/Python/2.7/site-packages
Adding pip 19.2.3 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/pip-19.2.3-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip

[John-Office:~] john% sudo pip install --upgrade b2
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
Collecting b2
Downloading https://files.pythonhosted.org/packages/90/b6/71ec542b76ea5a282dd2c2fb6f8427d90e3397e5db59593510667f14f236/b2-1.4.0.tar.gz (42kB)
|████████████████████████████████| 51kB 1.8MB/s
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-TDdma3/b2/setup.py'"'"'; file='"'"'/private/tmp/pip-install-TDdma3/b2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/tmp/pip-install-TDdma3/b2/
Complete output (1 lines):
setuptools 20.2 or later is required. To fix, try running: pip install "setuptools>=20.2"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

[John-Office:~] john% pip install "setuptools>=20.2"
pip: Command not found.

[John-Office:~] john% sudo pip install --upgrade --ignore-installed b2
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
Collecting b2
Using cached https://files.pythonhosted.org/packages/90/b6/71ec542b76ea5a282dd2c2fb6f8427d90e3397e5db59593510667f14f236/b2-1.4.0.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-XHHC_R/b2/setup.py'"'"'; file='"'"'/private/tmp/pip-install-XHHC_R/b2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/tmp/pip-install-XHHC_R/b2/
Complete output (1 lines):
setuptools 20.2 or later is required. To fix, try running: pip install "setuptools>=20.2"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@ppolewicz
Copy link
Collaborator

You forgot to prefix pip install "setuptools>=20.2" with sudo and it returned an error. Run:
sudo pip install "setuptools>=20.2"
and then
sudo pip install --upgrade --ignore-installed b2

@JRC234
Copy link
Author

JRC234 commented Aug 29, 2019

Thanks for finding my problem. I feel stupid for not copying and pasting correctly. But I looked, and looked for what went wrong. I didn't know enough to spot the missing word. Thanks again.

@JRC234 JRC234 closed this as completed Aug 29, 2019
@JRC234
Copy link
Author

JRC234 commented Aug 29, 2019

I spoke too soon. I did as you suggested but still get an error. I hope I'm not just too inexperienced to do this right...
After entering: sudo pip install "setuptools>=20.2" I still get an error as shown below:

[John-Office:~] john% sudo pip install "setuptools>=20.2"
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
Collecting setuptools>=20.2
Using cached https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 18.5
Uninstalling setuptools-18.5:
ERROR: Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/private/tmp/pip-uninstall-5IIu2L/markers.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-5IIu2L/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.py', '/private/tmp/pip-uninstall-5IIu2L/init.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-5IIu2L/init.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/private/tmp/pip-uninstall-5IIu2L/markers.py', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-5IIu2L/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/init.pyc', '/private/tmp/pip-uninstall-5IIu2L/init.pyc', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-5IIu2L/init.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/private/tmp/pip-uninstall-5IIu2L', "[Errno 1] Operation not permitted: '/private/tmp/pip-uninstall-5IIu2L'")]

If I run the command after that (sudo pip install --upgrade --ignore-installed b2) it too gives an error, I assume because of the first error. I'm not sure why the lines below are showing strikethru's. It doesn't look like that in Terminal:

[John-Office:] john% sudo pip install --upgrade --ignore-installed b2
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
Collecting b2
Using cached https://files.pythonhosted.org/packages/90/b6/71ec542b76ea5a282dd2c2fb6f8427d90e3397e5db59593510667f14f236/b2-1.4.0.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-9sNWKo/b2/setup.py'"'"'; file='"'"'/private/tmp/pip-install-9sNWKo/b2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /private/tmp/pip-install-9sNWKo/b2/
Complete output (1 lines):
setuptools 20.2 or later is required. To fix, try running: pip install "setuptools>=20.2"
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
[John-Office:
] john%

@JRC234 JRC234 reopened this Aug 29, 2019
@ppolewicz
Copy link
Collaborator

It is a MacOS issue specific to system version of Python. @bwbeach perhaps you have some experience with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants