Hey Simon and @the-dharma-bum,
Mind if I join in on the fun? Iām trying to replicate what you have done Simon, but am running into issues. It probably stems from lack of understanding of pyoxidizer, poetry, node, yarn, essentially everything you have used to create your app.
I guess to start from the top, installation:
- pyoxidizer
- Instructions.
- Ran the following in CMD prompt:
pip install pyoxidizer
- poetry
- Instructions
- Ran the following in Windows (Powershell):
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
- Node
- Instructions
- Downloaded and installed Node.js 16.17.0 LTS.
- Funny Storyā¦ This also deleted Python from my computer. I clicked the button which said āAutomatically install the necessary toolsā, which I guess also installs Python. It tried to install Python 3.10, said āInstall Failā and once it finished doing everything else, I tried to use pip and was told told āNo Pythonā.
- Yarn
- Instructions
- Ran the following in CMD prompt:
npm install --global yarn
npm install -g npm@8.18.0
Once I had everything installed, I began to run down your instructions.
Just as an FYI, Iām not working on github, just my local desktop.
First, it seems like I need to configure my pyoxidizer.bzl
config file. Iām looking at the example you provided here, and this is where I start to get lost. Specifically, what do I need to change in here to point to my streamlit application? Iām looking back and forth between what was written for Enopios and the pymedphys .bzl files and am making the best guess and am changing the following to match my .py files:
#python_config.run_module = "pymedphys"
python_config.run_module = "_Introduction_And_Setup"
#exe = dist.to_python_executable(
#name = "pymedphys", etc.,
exe = dist.to_python_executable(
name = "_Introduction_And_Setup",
packaging_policy = policy,
config = python_config,
)
Thatās the only thing I can see to update.
Next, looking at poetry, Iām familiar with virtual environments, but normally use pipenv to manage mine, but Iām willing to give poetry a try. Launching CMD Prompt from the project folder, I used, poetry init
and went through the steps to set up the dependencies I use in this project. Looking at the repo posted for Enopios, the readme states I should use the following to create my requirements.txt:
poetry export -f requirements.txt --output requirements.txt
Then I use:
poetry run pyoxidizer build
However, I kept getting the following error:
In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
setuptools>=18.5 from https://files.pythonhosted.org/packages/d9/5f/2daccd14278b6b780ae6799f85998377c06019354982391245f4b58a927d/setuptools-65.3.0-py3-none-any.whl#sha256=2e24e0bec025f035a2e72cdd1961119f557d78ad331bb00ff82efb2ab8da8e82 (from ipython==8.4.0->-r requirements.txt (line 275))
researching the error led me to adding --without-hashes to the end of the command like so:
poetry export -f requirements.txt --output requirements.txt --without-hashes
and then reran the pyoxidizer command. Which is now erroring out on āexe.add_python_resources(exe.pip_install([ā.ā]))ā. and after working on this some this past weekend and all day today, Iāve ran out of ways to troubleshoot this myself and am now asking for help. Thank you!