Certbot Python Augeas dependency - python

Trying to spin up a simple LAMP service with AWS and Certbot SSL. Followed all the directions but my when I run the certbot-auto I'm given the following error:
The apache plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError('Problem in Augeas installation',)
My attempts to install python-augeas via:
pip3 install python-augeas
result:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-27aroyjq/python-augeas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-27aroyjq/python-augeas/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 /tmp/pip-install-27aroyjq/python-augeas/pip-egg-info
cwd: /tmp/pip-install-27aroyjq/python-augeas/
Complete output (31 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-27aroyjq/python-augeas/setup.py", line 43, in <module>
test_suite="test.test_augeas",
File "/home/ec2-user/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/setuptools/dist.py", line 448, in __init__
k: v for k, v in attrs.items()
File "/usr/lib64/python3.6/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/home/ec2-user/.local/lib/python3.6/site-packages/setuptools/dist.py", line 740, in finalize_options
ep.load()(self)
File "/home/ec2-user/.local/lib/python3.6/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/setuptools_ext.py", line 217, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "augeas/ffi.py", line 47, in <module>
lib = ffi.dlopen("augeas")
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/tmp/pip-install-27aroyjq/python-augeas/.eggs/cffi-1.14.0-py3.6-linux-x86_64.egg/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Anyone have any ideas?

$ yum install augeas
$ python3 -m pip install certbot
This fixed the problem on a AWS Linux 2 instance.
If you use a load balancer then you can use the AWS ACM service.
If not, I found Certbot works really well.
Thanks tink for pointing me the right direction.

Related

Unable to find pgen, not compiling formal grammar. running egg_info

I am trying to install an app requirements on my local machine. However, I am stuck on the following error that seems to be related to cython. This occurs when I run the following code on Windows 10:
pip install -r requirements.txt
which results in the following error. Can someone please let me know what is the cause of this error?
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Eli\AppData\Local\Programs\Python\Python310\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\setup.py'"'"'; file='"'"'C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66'
cwd: C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4
Complete output (43 lines):
Unable to find pgen, not compiling formal grammar.
running egg_info
creating C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info
writing C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info\PKG-INFO
writing dependency_links to C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info\dependency_links.txt
writing entry points to C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info\entry_points.txt
writing top-level names to C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info\top_level.txt
writing manifest file 'C:\Users\Eli\AppData\Local\Temp\pip-pip-egg-info-oo__ie66\Cython.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\setup.py", line 228, in
setup(
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\egg_info.py", line 299, in run
self.find_sources()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\egg_info.py", line 541, in run
self.add_defaults()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\egg_info.py", line 578, in add_defaults
sdist.add_defaults(self)
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\command\sdist.py", line 228, in add_defaults
self._add_defaults_ext()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\command\sdist.py", line 311, in _add_defaults_ext
build_ext = self.get_finalized_command('build_ext')
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 299, in get_finalized_command
cmd_obj.ensure_finalized()
File "C:\Users\Eli\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 107, in ensure_finalized
self.finalize_options()
File "C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\Cython\Distutils\build_ext.py", line 20, in finalize_options
self.distribution.ext_modules[:] = cythonize(
File "C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\Cython\Build\Dependencies.py", line 959, in cythonize
module_list, module_metadata = create_extension_list(
File "C:\Users\Eli\AppData\Local\Temp\pip-install-95mpxv94\cython_6c43cf9f18634be392cac50ea5fe94e4\Cython\Build\Dependencies.py", line 752, in create_extension_list
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
AttributeError: module 'collections' has no attribute 'Iterable'
WARNING: Discarding https://files.pythonhosted.org/packages/9c/9b/706dac7338c2860cd063a28cdbf5e9670995eaea408abbf2e88ba070d90d/Cython-0.29.14.tar.gz#sha256=e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414 (from https://pypi.org/simple/cython/) (requires-python:>=2.6, !=3.0., !=3.1., !=3.2.*). Command errored out with exit status 1: python se
The issue was that cython==0.29.14 version is NOT YET COMPATIBLE WITH PYTHON 10. I ran the requirements.txt with Python version 8.8 and the issue was resolved. Thanks for your help. This issue is now closed

macOS Big Sur: _cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture

When trying to install pycares on my mac (Big Sur 11.3.1) with pip3 install -r pycares I get the following error:
Collecting pycares
Using cached pycares-4.0.0.tar.gz (819 kB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py'"'"'; __file__='"'"'/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-pip-egg-info-1ig5h0aa
cwd: /private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/
Complete output (29 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/setup.py", line 16, in <module>
setup(name = 'pycares',
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/homebrew/Cellar/python#3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py", line 455, in __init__
_Distribution.__init__(self, {
File "/opt/homebrew/Cellar/python#3.9/3.9.6/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py", line 801, in finalize_options
ep(self)
File "/opt/homebrew/lib/python3.9/site-packages/setuptools/dist.py", line 808, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_cares.py", line 603, in <module>
ffi = cffi.FFI()
File "/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: dlopen(/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so, 2): no suitable image found. Did find:
/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
/private/var/folders/jv/yxdbb6tn6n5gc9w719g8rt48000170/T/pip-install-59emzx2m/pycares_c75c0122a38f404d9813047a7451425b/.eggs/cffi-1.14.6-py3.9-macosx-11-arm64.egg/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/25/5a/ed8cc3340b7e83a5e572b5d27387a968a7e52b1e3c269442076ca902b7ba/pycares-4.0.0.tar.gz#sha256=d0154fc5753b088758fbec9bc137e1b24bb84fc0c6a09725c8bac25a342311cd (from https://pypi.org/simple/pycares/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I installed python with brew (Python 3.9.6), removed the packages and tried to reinstall them, still the same error.
There are some solutions available for the problem mach-o, but wrong architecture, but I couldn't find one for this specific problem.

Can not install pip install sphinxcontrib-openapi - "Defaulting to user installation because normal site-packages is not writeable"

I have python 2.7.5 installed and have installed these modules sucessfully
pip install sphinx==1.6.1
pip install sphinxcontrib-httpdomain
pip install sphinxcontrib.inlinesyntaxhighlight
But pip install sphinxcontrib-openapi giving errors as shown below. I have tried reading the possible solutions to this issue on web for some time now but have really not able to figure this issue out.
-bash-4.2$ pip install sphinxcontrib-openapi
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting sphinxcontrib-openapi
Using cached sphinxcontrib-openapi-0.6.0.tar.gz (173 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-T5Gbq2/sphinxcontrib-openapi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-T5Gbq2/sphinxcontrib-openapi/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 /tmp/pip-pip-egg-info-XiwTiv
cwd: /tmp/pip-install-T5Gbq2/sphinxcontrib-openapi/
Complete output (46 lines):
/tmp/easy_install-YIaJG0/setuptools_scm-6.0.1/src
<pkg_resources.WorkingSet object at 0x7f3c06997510>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-T5Gbq2/sphinxcontrib-openapi/setup.py", line 57, in <module>
namespace_packages=['sphinxcontrib'],
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 289, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 618, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 862, in best_match
return self.obtain(req, installer) # try and download/install
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 874, in obtain
return installer(requirement)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 339, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 623, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 653, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 849, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1130, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1115, in run_setup
run_setup(setup_script, args)
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 69, in run_setup
lambda: execfile(
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 120, in run
return func()
File "/usr/lib/python2.7/site-packages/setuptools/sandbox.py", line 71, in <lambda>
{'__file__':setup_script, '__name__':'__main__'}
File "setup.py", line 52, in <module>
'Programming Language :: Python :: 3.4',
File "setup.py", line 29, in scm_config
setup_requires=[
File "/tmp/easy_install-YIaJG0/setuptools_scm-6.0.1/src/setuptools_scm/__init__.py", line 8, in <module>
File "/tmp/easy_install-YIaJG0/setuptools_scm-6.0.1/src/setuptools_scm/config.py", line 6, in <module>
File "/tmp/easy_install-YIaJG0/setuptools_scm-6.0.1/src/setuptools_scm/utils.py", line 41
print(*k)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
-bash-4.2$ ^C

Error in updating AWS cli to latest version

I'm trying to update AWS CLI to the latest version. I'm following the below AWS documentation:
Aws cli upgrade with sudo access
When I run the command:
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
I get a long python error, which I can't understand. What is the problem here?
Error message:
Deprecated Python version detected: Python 2.7
Starting July 15, 2021, the AWS CLI will no longer support this version of Python. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.6 or later. More information can be found here: https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-python-2-7-in-aws-sdk-for-python-and-aws-cli-v1/
Running cmd: /bin/python virtualenv.py --no-download --python /bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. setuptools_scm-3.3.3.tar.gz
Traceback (most recent call last):
File "./awscli-bundle/install", line 270, in <module>
main()
File "./awscli-bundle/install", line 247, in main
pip_install_packages(opts.install_dir)
File "./awscli-bundle/install", line 167, in pip_install_packages
_install_setup_deps(pip_script, '.')
File "./awscli-bundle/install", line 184, in _install_setup_deps
pip_script, setup_package_dir, setuptools_scm_tarball))
File "./awscli-bundle/install", line 90, in run
p.returncode, cmd, output))
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-binary :all: --no-cache-dir --no-index --find-links file://. setuptools_scm-3.3.3.tar.gz': Looking in links: file://.
Processing ./setuptools_scm-3.3.3.tar.gz
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
ERROR: Command errored out with exit status 1:
command: /usr/local/aws/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-M9znG_/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-M9znG_/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 /tmp/pip-req-build-M9znG_/pip-egg-info
cwd: /tmp/pip-req-build-M9znG_/
Complete output (36 lines):
running egg_info
creating /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info
writing /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/PKG-INFO
writing top-level names to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/top_level.txt
writing dependency_links to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/dependency_links.txt
writing entry points to /tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/entry_points.txt
writing manifest file '/tmp/pip-req-build-M9znG_/pip-egg-info/setuptools_scm.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-M9znG_/setup.py", line 118, in <module>
setuptools.setup(**arguments)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 296, in run
self.find_sources()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 303, in find_sources
mm.run()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 534, in run
self.add_defaults()
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/egg_info.py", line 574, in add_defaults
rcfiles = list(walk_revctrl())
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/sdist.py", line 20, in walk_revctrl
for item in ep.load()(dirname):
File "/tmp/pip-req-build-M9znG_/src/setuptools_scm/integration.py", line 22, in find_files
command = ep.load()
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'FILES_COMMAND'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Unable to download InstaPy python module via pip install

This error comes up when trying to install InstaPy python module:
Downloading https://files.pythonhosted.org/packages/eb/ee/e59e74ecac678a14d6abefb9054f0bbcb318a6452a30df3776f133886d7d/
googleapis-common-protos-1.6.0.tar.gz
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Seyi\Python\Python36\python.exe' -c 'import sys, setuptools, tokenize;
sys.argv[0] = '"'"'C:\Users\Seyi\AppData\Local\Temp\pip-install-i7zyc4ej
\googleapis-common-protos\setup.py'"'"'; file='"'"'C:\Users\Seyi\AppData\Local\Temp\
pip-install-i7zyc4ej\googleapis-common-protos\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 'C:\Users\Seyi\AppData\Local\Temp\pip-install-i7zyc4ej\googleapis-common-protos\pip-egg-info'
cwd: C:\Users\Seyi\AppData\Local\Temp\pip-install-i7zyc4ej\googleapis-common-protos\
Complete output (21 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Seyi\Python\Python36\lib\site-packages\setuptools__init__.py", line 10, in
from setuptools.extern.six.moves import filter, filterfalse, map
File "C:\Users\Seyi\Python\Python36\lib\site-packages\setuptools\extern__init__.py", line 1, in
from pkg_resources.extern import VendorImporter
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 3017, in
#_call_aside
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 3003, in _call_aside
f(*args, **kwargs)
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 3045, in _initialize_master_working_set
dist.activate(replace=False)
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 2577, in activate
declare_namespace(pkg)
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 2151, in declare_namespace
_handle_ns(packageName, path_item)
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 2091, in _handle_ns
_rebuild_mod_path(path, packageName, module)
File "C:\Users\Seyi\Python\Python36\lib\site-packages\pkg_resources__init__.py", line 2120, in _rebuild_mod_path
orig_path.sort(key=position_in_sys_path)
AttributeError: '_NamespacePath' object has no attribute 'sort'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Please mention the command that you are using. However, I would suggest you to update pip, and make sure to use pip3 if applicable.
It seems my setuptools wasn't up to date so I had to upgrade it via pip.
Command line used: python -m pip install --upgrade setuptools
(You probably won't need the python part)
Full explanation here

Categories