Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about packaging with globally installed Nuitka in a virtual environment #2686

Closed
mogoyu opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
question Question asked about Nuitka

Comments

@mogoyu
Copy link

mogoyu commented Feb 2, 2024

  • Nuitka version 2.0

    python --version 3.8.18

I installed Nuitka on my system (globally), then I created a new project with pycharm in a virtual environment, and I installed all the libraries or packages I need in the virtual environment, and it executes correctly, and then I executed the Nuitka commands in the virtual environment on the command line in pycharm: nuitka --clang -- standalone --show-progress --show-memory --onefile --enable-plugin=pyside2 --windows-icon-from-ico=. standalone --show-progress --show-memory --onefile --enable-plugin=pyside2 --windows-icon-from-ico=... /logo.ico --output-dir=out main.py
will result in unpacked libraries and packages for the virtual environment. However, if I install Nuitka in the virtual environment and execute the same package command again in the virtual environment, the software will be packaged correctly. Is it possible to package the libraries and packages in the virtual environment correctly using the global Nuitka without installing Nuitka in the virtual environment? If so, what do I need to do?

@kayhayen
Copy link
Member

kayhayen commented Feb 2, 2024

Nuitka wants to run inside the virtual environment. Nuitka does not need to be installed.

So if you do python-from-virtualenv Nuitka.git/bin/nuitka it will load Nuitka from there and it is never installed and always matches exactly what you do in git, update, edit, branch switch, etc.

Alternatively python-from-virtualenv setup.py develop injects a small pth file, with the same effect, and you can then use python-from-virtualenv -m nuitka as if it was installed, but it's not.

@kayhayen kayhayen added the question Question asked about Nuitka label Feb 2, 2024
@kayhayen kayhayen self-assigned this Feb 2, 2024
@kayhayen kayhayen closed this as completed Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question asked about Nuitka
Projects
None yet
Development

No branches or pull requests

2 participants