(2017-01-09, 23:01)digiltd Wrote: @Gibsarno
Ok, I think all caps for PYTHON --VERSION was causing it to fail. I can see it is installed from the error message for pip.
The short answer is it is a permissions issue. Your Python is installed in /Library which means you need to run the command as an admin user.
It is tricky to know what to recommend, there is a very simple answer which is run the Code:
pip install lambda-deploy
command as a root user by putting "sudo" in front of it Code:
sudo pip install lambda-deploy
.
Using sudo is very risky and especially if you do not know what you are doing. So I advise against it as you do not want to be installing anything in the system version of Python, though I think you may have already done so with pip.
You should not have to use sudo for python etc on mac. You do this by running "local" versions that are kept separate from the system version.
The easiest way to do this is by using homebrew http://brew.sh/
Follow the instructions on the homepage, you only have to copy and paste one line, but DO NOT use sudo to run it. Homebrew does a great job at keeping separate at a user level, so you should never use sudo.
After installing you run
After you have done that and followed the instructions, close terminal and open it again. Try and and
What this does is ask "which is the version of python/pip ready to use?" and "where are the versions of python/pip on my system?"
You should see something like:
If "which python" and "which pip" are both reporting /usr/local/bin/python then you can install lambda-deploy using
Code:
pip install lambda-deploy
Then fingers crossed, when you cd into your kodi-alexa-master folder, you should be able to run Code:
python deploy-to-lambda.py
sucesfully.
I followed this after it not working on my OSX
I now get this:
Code:
MacBook-Air:~ mc$ pip install lambda-deploy
Collecting lambda-deploy
Using cached lambda_deploy-0.1.2-py2-none-any.whl
Collecting boto3>=1.3.0 (from lambda-deploy)
Using cached boto3-1.4.4-py2.py3-none-any.whl
Collecting yaep>=0.0.4 (from lambda-deploy)
Using cached yaep-0.0.6-py2-none-any.whl
Collecting requests>=2.9.1 (from lambda-deploy)
Using cached requests-2.13.0-py2.py3-none-any.whl
Collecting botocore<1.6.0,>=1.5.0 (from boto3>=1.3.0->lambda-deploy)
Using cached botocore-1.5.11-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.3.0->lambda-deploy)
Using cached jmespath-0.9.1-py2.py3-none-any.whl
Collecting s3transfer<0.2.0,>=0.1.10 (from boto3>=1.3.0->lambda-deploy)
Using cached s3transfer-0.1.10-py2.py3-none-any.whl
Collecting docutils>=0.10 (from botocore<1.6.0,>=1.5.0->boto3>=1.3.0->lambda-deploy)
Using cached docutils-0.13.1-py2-none-any.whl
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.6.0,>=1.5.0->boto3>=1.3.0->lambda-deploy)
Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" (from s3transfer<0.2.0,>=0.1.10->boto3>=1.3.0->lambda-deploy)
Using cached futures-3.0.5-py2-none-any.whl
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore<1.6.0,>=1.5.0->boto3>=1.3.0->lambda-deploy)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: jmespath, docutils, six, python-dateutil, botocore, futures, s3transfer, boto3, yaep, requests, lambda-deploy
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 377, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/local/bin/jp.py'
Also when I ask "where python" or "where pip" I get:
Code:
-bash: where: command not found
But using "which python" or "which pip" it comes back as
Code:
/usr/local/bin/python
and
EDIT:
Used heroku instead and so far so good.