Ich versuche, eine PEX-Datei einer einfachen 3-Seiten-Website zu erstellen. Die Website arbeitet mit Gunicorn auf python3, der Client möchte die Site zu einer gekapselten pex
Datei kompilieren.Erstellen einer PEX von einer kleinen Flasche Website
pex -r zb1/requirements.txt -e zb1/run -o zb1.pex
auch versucht
pex -r zb1/requirements.txt -m zb1:run -o zb1.pex
Wenn ich das Kommando führen Sie es einfach gut kompiliert, aber das Problem ist, wenn ich eine PEX-Datei auszuführen versuchen.
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
Ich habe verschiedene Varianten der pex
Befehle ausprobiert. Dies ist auf MacOSX El Capitan mit Python2.7 und Python3.5
Vielen Dank im Voraus und lassen Sie mich wissen, wenn Sie zusätzliche Informationen benötigen.
Projektstruktur
zb1
├── README.md
├── __init__.py
├── application
│ ├── config.py
│ ├── static
│ ├── templates
│ ├── uploads
│ ├── utilities
│ └── zbo
├── buildup.py
├── env
├── requirements.txt
├── run.py << ENTRY POINT!
└── setup.sh