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
run a python app without installing it[SOLVED-Tnx 2 pylkko]
run a python app without installing it[SOLVED-Tnx 2 pylkko]
dear citizens of gotham,
tldr:
i can just run the binary after running make in the source folder of applications built in c, no need to install the damn thing. Is there is any way to do the same for packages built in python?
long version
i realized a couple months back that there is no need to actually install an application built from source. I limit what i run using root privileges. Installing anything needs that. I am more than happy to just run make and then run the built binary (after making it executable of course).
My world was a happy place until i stumbled across apps in python. And i c what i did earlier is not possible for packages written in python.
So my question is is there any way to just build the app from source and run the binary without installing for something written in python?
I see that their readme.md advises to run sudo setup.py install together. I dont want to install it but just build it and run the binary. i can add the links to usr application folder and wherever required.
tldr:
i can just run the binary after running make in the source folder of applications built in c, no need to install the damn thing. Is there is any way to do the same for packages built in python?
long version
i realized a couple months back that there is no need to actually install an application built from source. I limit what i run using root privileges. Installing anything needs that. I am more than happy to just run make and then run the built binary (after making it executable of course).
My world was a happy place until i stumbled across apps in python. And i c what i did earlier is not possible for packages written in python.
So my question is is there any way to just build the app from source and run the binary without installing for something written in python?
I see that their readme.md advises to run sudo setup.py install together. I dont want to install it but just build it and run the binary. i can add the links to usr application folder and wherever required.
Last edited by sickpig on 2019-06-09 23:40, edited 1 time in total.
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: run a python app without installing it
Yes:sickpig wrote:Is there is any way to do the same for packages built in python?
Code: Select all
./application.py
deadbang
Re: run a python app without installing it
thanks Head_on_a_Stick that would make everything right in the world again. lemme check.
Re: run a python app without installing it
no dice
m back with tail between me legs, it spat the below error
voices in my head said maybe i misunderstood your reply and i should run ./setup.py, tried that but it is still not done with spitting errors
m back with tail between me legs, it spat the below error
Code: Select all
~/persepolis/persepolis/scripts$ python3 ./persepolis.py
Traceback (most recent call last):
File "./persepolis.py", line 16, in <module>
from persepolis.scripts.useful_tools import osAndDesktopEnvironment, determineConfigFolder
File "/home/a/persepolis/persepolis/scripts/persepolis.py", line 16, in <module>
from persepolis.scripts.useful_tools import osAndDesktopEnvironment, determineConfigFolder
ImportError: No module named 'persepolis.scripts'; 'persepolis' is not a package
Code: Select all
a@a:~/persepolis$ python3 ./setup.py
Linux detected!
python3-pyqt5 is found
python3-requests is found!
python3-setproctitle is found!
python3-psutil is found!
youtube-dl is found
aria2 is found!
libnotify-bin is found!
paplay is found!
sound-theme-freedesktop is found!
Traceback (most recent call last):
File "./setup.py", line 130, in <module>
if sys.argv[1] == "test":
IndexError: list index out of range
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: run a python app without installing it
No, I did mean to run the application directly but it will only work if no modules are needed, which is not the case for your example.sickpig wrote:maybe i misunderstood your reply and i should run ./setup.py
deadbang
Re: run a python app without installing it
Python is intended to be an interpreted language and the entire point is that you never have to make a binary (although sometimes Python program parts are compiled in C for performance).sickpig wrote:dear citizens of gotham,
So my question is is there any way to just build the app from source and run the binary without installing for something written in python?
I see that their readme.md advises to run sudo setup.py install together. I dont want to install it but just build it and run the binary. i can add the links to usr application folder and wherever required.
So in a way it is even better (for what you want here) as you don't need to do anything more than copy paste the source code into the interpreter. However, just like in c where more complicated programs have references to installed libraries (which the programs install with an installer upon setup) python programs can also import other python code (if it is installed). So you can look at the source code and see what modules it is importing and and get them in whatever way you want, if you don't want to install them. But pip should be able to install packages without root.
Re: run a python app without installing it
thanks fellas for taking the time to explain details. Appreciate your patience against my obvious lack of knowledge.
pip seems to be my ticket then? lemme check if i can get it to work. i can see there are package managers like linuxbrew which let you install in the home directory(without needing to be root), but i am looking to avoid installing anything at all, if possible.
lets c
pip seems to be my ticket then? lemme check if i can get it to work. i can see there are package managers like linuxbrew which let you install in the home directory(without needing to be root), but i am looking to avoid installing anything at all, if possible.
lets c
-
- Posts: 195
- Joined: 2019-03-12 23:26
Re: run a python app without installing it
Why not use containers? It is a good way to keep dependencies under control. Docker is fairly easy to install and grabbing the official Debian or Python (built from Debain as I recall) images is easy.sickpig wrote:thanks fellas for taking the time in explaining in details. Appreciate your patience against my obvious lack of knowledge.
pip seems to be my ticket then? lemme check if i can get it to work. i can see there are package managers like linuxbrew which let you install in the home directory(without needing to be root), but i am looking to avoid installing anything at all, if possible.
lets c
Re: run a python app without installing it
yup valid option but m wary it will start its startup daemon and bunch of startup processes. my ocd will make me disable them
But definitely worth considering. Appreciate your suggestion.
But definitely worth considering. Appreciate your suggestion.
Re: run a python app without installing it
no significant progress today, was pure unbridled lazy, watched a crap movie and converted oxygen to co2. thats about it.
but there is hope.
found a pip3 package in stretch repo and a seemingly helpful guide https://www.ostechnix.com/pipenv-offici ... ging-tool/
pylkko we might just win the war against machines! i will get to it soon and report back.
but there is hope.
found a pip3 package in stretch repo and a seemingly helpful guide https://www.ostechnix.com/pipenv-offici ... ging-tool/
pylkko we might just win the war against machines! i will get to it soon and report back.
Re: run a python app without installing it
pylkko u did it!!! u my new hero! many thanks, much obliged
i could get the app to run using the earlier mentioned guide without installing it or running anything as root at all. Amazing.
I had given up but your tip about pip changed it around. I had searched google up to 3 pages but no mention of how to do what i wanted to do.
i could get the app to run using the earlier mentioned guide without installing it or running anything as root at all. Amazing.
I had given up but your tip about pip changed it around. I had searched google up to 3 pages but no mention of how to do what i wanted to do.