Chalice: running deploy on Windows raises "assert os.path.isfile(pip_exe)"

Created on 12 Jul 2016  路  4Comments  路  Source: aws/chalice

I'm following the tutorial instructions and getting the error below:

chalice deploy
Initial creation of lambda function.
Updating IAM policy.
Creating deployment package.
Traceback (most recent call last):
File "C:\Python27\Lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\rlloydvenvs\chalice-demo\Scripts\chalice.exe__main__.py", line 9, in

...snipped...

_first_time_lambda_create
config['project_dir'])
File "c:\users\rlloydvenvs\chalice-demolib\site-packages\chalice\deployer.py", line 633, in create_deployment_package
assert os.path.isfile(pip_exe)
AssertionError

bug

Most helpful comment

Here is a workaround for this

deployer.py line #632:

pip_exe = os.path.join(venv_dir, 'Scripts', 'pip')

pip_exe = os.path.join(venv_dir, 'Scripts', 'pip.exe')

deployer.py line #644:
#python_dir = os.listdir(os.path.join(venv_dir, 'lib'))[0]
#deps_dir = os.path.join(venv_dir, 'lib', python_dir,
deps_dir = os.path.join(venv_dir, 'lib',
'site-packages')

All 4 comments

Here is a workaround for this

deployer.py line #632:

pip_exe = os.path.join(venv_dir, 'Scripts', 'pip')

pip_exe = os.path.join(venv_dir, 'Scripts', 'pip.exe')

deployer.py line #644:
#python_dir = os.listdir(os.path.join(venv_dir, 'lib'))[0]
#deps_dir = os.path.join(venv_dir, 'lib', python_dir,
deps_dir = os.path.join(venv_dir, 'lib',
'site-packages')

Thanks for reporting. I'll get this updated.

I had the same issue. listed workaround worked for me. thanks.

Was this page helpful?
0 / 5 - 0 ratings