However, in one of the last steps I get an error which I haven’t been able to resolve yet. It’s where you run the pip install -r requirements.txt command from the virtual environment. The output ends with:
Running setup.py (path:/tmp/pip-build-ZQzekM/cryptography/setup.py) egg_info for package cryptography
error in cryptography setup command: Invalid environment marker: python_version < ‘3’
Complete output from command python setup.py egg_info:
error in cryptography setup command: Invalid environment marker: python_version < ‘3’
So it doesn’t seem to like the Python version. The skill requires Python 2.7 which seems to be installed so I’m not sure why this is going wrong. Does anyone know how to resolve this? Thanks!
Cleaning up…
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-TUx5Kw/cryptography
Storing debug log for failur> e in /root/.pip/pip.log
And this is from the PIP log, not very helpful…
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-TUx5Kw/cryptography
I have the same error when install cryptography. But then I’ve tried to execute:
sudo pip install --upgrade pip
sudo pip install --upgrade setuptools
sudo pip install cryptography
It still can’t install cryptography, but with another error.
No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)
Thanks for all the help andrewol, the crypto package has installed correctly.
Some steps further in the installation instructions I need to install this: sudo pip install packaging zappa lambda-packages
But the package install stops with a memory error:
Collecting lambda-packages
Downloading lambda_packages-0.19.0.tar.gz (74.1MB)
99% |############################### | 74.1MB 5.2MB/s eta 0:00:01Exception:
Traceback (most recent call last):
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/commands/install.py”, line 324, in run
requirement_set.prepare_files(finder)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/req/req_set.py”, line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/req/req_set.py”, line 620, in _prepare_file
session=self.session, hashes=hashes)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 821, in unpack_url
hashes=hashes
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 659, in unpack_http_url
hashes)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 882, in _download_http_url
_download_url(resp, link, content_file, hashes)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 603, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/utils/hashes.py”, line 46, in check_against_chunks
for chunk in chunks:
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 571, in written_chunks
for chunk in chunks:
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/utils/ui.py”, line 139, in iter
for x in it:
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/download.py”, line 560, in resp_read
decode_content=False):
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py”, line 357, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py”, line 314, in read
data = self._fp.read(amt)
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 63, in read
self._close()
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py”, line 50, in _close
self.__callback(self.__buf.getvalue())
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py”, line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File “/home/osmc/kodi-alexa/venv/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py”, line 87, in dumps
).encode(“utf8”),
MemoryError
EDIT: It’s ugly but editing cli.py to remove the virtual environment check works.
Next step: sudo zappa deploy dev gave a region error. It turned out that it needed to be run without sudo to get the correct .env file (?) to deploy.
Next error:
ParamValidationError: Parameter validation failed:
Invalid type for parameter CreateBucketConfiguration.LocationConstraint, value: None, type: <type ‘NoneType’>, valid types: <type ‘basestring’>
No idea yet, keep on searching …
EDIT 2: Still not working but some the error when zappa is complaining about the six package missing can be solved by:
pip uninstall six
pip install six
Also, I’ve changed both the owener and the group to OSMC for the kodi-alexa folder.
EDIT3
I solved the error, it turned out that the earlier generated zappa_settings.json file had a null value for the region. I changed it to eu-west-1 - The deployment command now runs succesfully
I can really recommend trying it out yourself, the manual explains most things just fine. It also contains some youtube links demoing the possibilities.
With the information provided by andrewvol and some of my findings you should be good to go. Cheers!