Giter VIP home page Giter VIP logo

Comments (9)

ofek avatar ofek commented on May 27, 2024

Can you give me commands that I could run to disable network?

from pyapp.

tfmoraes avatar tfmoraes commented on May 27, 2024

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.

Stubatiger avatar Stubatiger commented on May 27, 2024

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.

ofek avatar ofek commented on May 27, 2024

@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?

@Stubatiger

  • 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.

ofek avatar ofek commented on May 27, 2024

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.

tfmoraes avatar tfmoraes commented on May 27, 2024

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.

ofek avatar ofek commented on May 27, 2024

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.

tfmoraes avatar tfmoraes commented on May 27, 2024

Thanks @ofek. How can I preinstall into a distribution and use that?

from pyapp.

ofek avatar ofek commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.