I am attempting to create a PEX file of a simple 3 page flask website. The website works with Gunicorn on python3, the client wants the site compiled to a encapsulated pex
file.
pex -r zb1/requirements.txt -e zb1/run -o zb1.pex
also tried
pex -r zb1/requirements.txt -m zb1:run -o zb1.pex
When I run that command it compiles just fine but the trouble is when I attempt to run a pex file.
c:~ c$ ./zb1.pex
Traceback (most recent call last):
File ".bootstrap/_pex/pex.py", line 326, in execute
File ".bootstrap/_pex/pex.py", line 258, in _wrap_coverage
File ".bootstrap/_pex/pex.py", line 290, in _wrap_profiling
File ".bootstrap/_pex/pex.py", line 369, in _execute
File ".bootstrap/_pex/pex.py", line 427, in execute_entry
File ".bootstrap/_pex/pex.py", line 432, in execute_module
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 192, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/usr/local/Cellar/python3/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 127, in _get_module_details
raise error("No module named %s" % mod_name)
ImportError: No module named zb1/run
I have tried different variations of the pex
commands. This is on MacOSX El Capitan with python2.7 and python3.5
Thank you in advance and let me know if you need any extra information.
Project Structure
zb1
├── README.md
├── __init__.py
├── application
│ ├── config.py
│ ├── static
│ ├── templates
│ ├── uploads
│ ├── utilities
│ └── zbo
├── buildup.py
├── env
├── requirements.txt
├── run.py << ENTRY POINT!
└── setup.sh