Hi,
I am trying to point a user shell to a compiled program in a Linux
system. Not sure if I've got a bug or am missing something. I've run
into the same issue on a Linux Mint dev machine as well as ARMv7 on a
Raspberry Pi4 - Raspberry Pi OS (32-bit) Lite [console only]. Error
received is "Fatal error: Unable to locate executable on PATH!". I do
have a virtual environment for the main computer/test files but not on
the pi4.
I'm at a loss as to what to try next. I don't think it would be an
issue with 32/64 bit since since I've built and ran on the same
computers. Maybe permissions within all of the files in lib?
Any help would be appreciated! Steps and files are below. Let me know
how to provide extra details if needed! Thanks,
-Ryan
Here are the steps I've followed.
0. setup user "tester" and home folder
1. Wrote a basic hello-world to run as the user shell (foo.py below)
2. Created a setup file with /cxfreeze-quickstart/. With some
unsuccessful attempts I've also tried various edits. Current attempt
version is below.
3. /python --version/
//Python 3.7.5 /[dev computer]/
Python 3.7.3 [Raspberry Pi 4]/
/
/python setup_foo.py build/
/...output.../
/Some error about missing modules but copies everything over
/
3.1. tested resulting 'foo' file and it runs just fine.
4. moved resulting file "foo" and the "lib" folder from under ./build to
/home/tester
5. Ran console commands to change tester user's shell, and switch user
to tester. Demonstrated this works for the python file, but not
compiled file.
$ sudo chsh -s /home/tester/foo.py tester
$ su - tester
Password:
/foobarred/
$ sudo chsh -s /home/tester/foo tester
$ su - tester
Password:
Fatal error: Unable to locate executable on PATH!
Also have chown'd the foo file and lib folder to tester.
/home/tester$ ls -l
total 16
-rwxr-xr-x 1 tester 10216 Jun 11 17:11 foo
drwxr-xr-x 45 tester 4096 Jun 11 17:50 lib
/home/tester/setup_foo.py:
fromcx_Freeze importsetup, Executable
buildOptions = dict(packages= [], excludes= [])
base = 'Console'
executables = [
Executable('foo.py', base=base, targetName="foo")
]
setup(name='foo',
version= '1.0',
description= 'bar',
options= dict(build_exe= buildOptions),
executables= executables)
/home/tester/foo.py
#!/usr/bin/env python3
importsys
base = 'Console'
defmain():
print("foobarred")
if__name__== "__main__":
main()
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users