Comments (9)
Can you give me commands that I could run to disable network?
from pyapp.
I deactivated network here (Fedora 40 in Gnome) using NetworkManager GUI but you can deactivate using Networkmanager cli:
nmcli connection down enp4s0
Replace enp4s0
with device.
from pyapp.
i too am currently trying to create a self contained executable with PyApp which does not need to download stuff at runtime.
As i understand it with PYAPP_DISTRIBUTION_EMBED=1
the python interpreter will be embeded and wont be needed to download at runtime.
But i cannot get PyApp to also download the dependencies at build-time. if i add PYAPP_PIP_EXTRA_ARGS=--no-deps
it wont install any dependencies of my .whl
at all.
Im also not sure what the difference between PYAPP_FULL_ISOLATION
and PYAPP_DISTRIBUTION_EMBED
is :/
from pyapp.
@tfmoraes I'm sorry I haven't had adequate time to troubleshoot, if possible do you think you could show me something that I could easily reproduce like a bash script or Dockerfile?
- There is no such option yet to resolve dependencies at build time, for now you must preinstall into a distribution and target that distribution and then skip installation.
- Isolation means no virtual environment is created but rather the project is installed in the base distribution that is unpacked while embedding refers to bundling the desired Python distribution into the binary which will be unpacked directly rather than downloading from somewhere.
from pyapp.
That "failed to iterate over archive" message is now fixed as of https://github.com/ofek/pyapp/releases/tag/v0.20.1
The issue was that the status code was not being checked so it would download a few bytes and count as success which it would then try to unpack immediately. To remove your cached distribution you may need to run <APP> self cache dist --remove
or get rid of it yourself.
Can you please try again?
from pyapp.
I run this command to create the executable:
PYAPP_PROJECT_PATH="$PWD/dist/bioscaffolds-0.1.0.post213.dev0+8e76bb1-py3-none-any.whl" PYAPP_EXEC_MODULE="BioScaffolds" PYAPP_PROJECT_NAME="BioScaffolds" PYAPP_PROJECT_VERSION="0.1.0.post216.dev0+3d0ad9c" PYAPP_DISTRIBUTION_EMBED=1 PYAPP_PROJECT_DEPENDENCY_FILE="$PWD/requirements.txt" PYAPP_FULL_ISOLATION=1 PYAPP_IS_GUI=1 cargo install pyapp --force --root dist
Then I disconnected my PC and tried to run:
> dist/bin/pyapp
Processing /tmp/.tmpoNk0kS/bioscaffolds-0.1.0.post213.dev0+8e76bb1-py3-none-any.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0914878f80>: Failed to establish a new connection: [Errno -3] Falha temporário na resolução de nome')': /simple/jinja2/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0914370110>: Failed to establish a new connection: [Errno -3] Falha temporário na resolução de nome')': /simple/jinja2/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0914370470>: Failed to establish a new connection: [Errno -3] Falha temporário na resolução de nome')': /simple/jinja2/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0914370680>: Failed to establish a new connection: [Errno -3] Falha temporário na resolução de nome')': /simple/jinja2/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0914370410>: Failed to establish a new connection: [Errno -3] Falha temporário na resolução de nome')': /simple/jinja2/
INFO: pip is looking at multiple versions of bioscaffolds to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement jinja2<4.0.0,>=3.1.3 (from bioscaffolds) (from versions: none)
ERROR: No matching distribution found for jinja2<4.0.0,>=3.1.3
from pyapp.
Oh, I see, yeah like I mentioned above:
There is no such option yet to resolve dependencies at build time, for now you must preinstall into a distribution and target that distribution and then skip installation.
I plan to add such an option in the coming months.
from pyapp.
Thanks @ofek. How can I preinstall into a distribution and use that?
from pyapp.
Basically pull down one of the distributions that is used by default, install whatever you want, archive it again, then embed as you are currently doing.
from pyapp.
Related Issues (20)
- Cannot use `PYAPP_DISTRIBUTION_PATH` (at least with locally embedded projects) HOT 5
- Notebook execution mode HOT 3
- Incorrect exit code HOT 4
- How to add `optional-dependencies` HOT 3
- Python version support - docs and code are inconsistent
- CPython 3.7 unaccessible from `x86_64` linux
- Build failure on Windows (whl METADATA containing CRLF) HOT 1
- Offline installation with local archive file
- can this lib work with streamlit? HOT 2
- PyApp with GUI program - disable console on Windows HOT 4
- Can not just copy binary to docker and run. HOT 1
- After built with pyapp, pip install failed for hdbscan HOT 16
- Cache pyapp build on GHA
- Support for gui-scripts HOT 5
- Management command for deleting installation files HOT 9
- Missing glibc when building an app on ubuntu and running on centos HOT 1
- feature: management command to open a shell HOT 1
- Tcl error using Tk HOT 3
- Newer PyApp releases are using a yanked version of zip, compilation fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyapp.