Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

build .deb python venv app

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
Nutz57
Posts: 1
Joined: 2022-04-20 09:40

build .deb python venv app

#1 Post by Nutz57 »

Hi !

im still struggling with packaging a python app :(

The goal is to create a .deb of an python app with a builtin venv. im using virtualenv building with : dh $@ --with python-virtualenv --builtin-venv --python /usr/local/bin/python3

first, i built a python app, everythings works fine, i created the .deb with :

Code: Select all

debuild -us -uc -b
after the installation with dpkg -i package.deb all directory and files seems to be at the right place and the virtualenv is created.
But even if all binaries are in the directory of the virtualenv :

Code: Select all

/opt/venvs/package/bin

Code: Select all

#ls
activate      activate.fish  connexion     easy_install-3.9   jsonschema  pip   pip3.7  python   python3.9 activate.csh  Activate.ps1   easy_install  flask             gunicorn    normalizer  pip3  pip3.9  python3  wheel
i get an issue...
No modules is recognized inside the venv...

Code: Select all

Traceback (most recent call last):
  File "/opt/venvs/package/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
what do i need in my build routine to avoid that ?

br,
N!

Post Reply