.py question
Gene Heskett
gheskett at shentel.net
Tue Apr 23 14:37:20 UTC 2019
On Tuesday 23 April 2019 09:04:16 Colin Watson wrote:
> On Mon, Apr 22, 2019 at 08:42:15PM -0400, Gene Heskett wrote:
> > I have a test equipment device running xenial, and one of the
> > options needs to run "python3 xxx.py" except I have no clue where to
> > put, in the file system, this xxx.py file so that python can find it
> > and execute it.
> >
> > So where should I install this file and its passel of cousins?
>
> "python3 xxx.py" just reads the named file from the current working
> directory. Put it in your current directory. If there are more files
> involved, then you're going to need to explain what you mean by "its
> passel of cousins" in order for anyone to offer effective advice.
>
I think the one we're calling, calls others from it. And the instructions
say to unpack the zip, but don't say where. And it gets run from a cli,
and from an icon in its gui. I have linux/macos versions of this and by
their mistken link, windows equ's that are are about 10x bigger.
Brand new device I have close to a thousand dollars in and I have already
bricked its m-sd card once following the suggested instructions, I think
because the download link for linux is broken, giving me the winders
version of all this. I snooped around and found the linux version of
this package on the makers website and grabbed that, but no clue where
to put it when I bring that m-sd card back to this machine to install
it. I don't claim to be a python guy. And I've never dealt with a
ubuntu xenial install before.
I believe the only 2 files I need from this .zip are the vna.py and
vna.ui, the rest of the zip seems to be parallel copies for MacOS.
This whole maryann is run from a browser, which ATM is an old wheezy
version of firefox. Maybe I should snoop around in the www subdir?
> Python programs normally import a number of other modules to do
> whatever they need to do. Such modules may well just be from Python's
> standard library (in which case you don't need to do anything
> special), or they may be from something installed as a package (ditto
> except maybe figure out the right thing to "apt install"), or they may
> be something specialised that you need to install yourself, in which
> case Joel's link might possibly be helpful but I would rather be
> inclined to recommend https://docs.python.org/3/tutorial/venv.html
> instead.
>
> Try just running the program without any of that first, though. If
> any modules are unavailable then it will tell you.
>
the error when I type in an ssh session:
python3 vna.pyRETURN
"can't find vna.py"
So obviously its not in the python3 version of $PATH, and I'm lost.
Hence this thread
> --
> Colin Watson
> [cjwatson at ubuntu.com]
Thanks Colin.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
More information about the ubuntu-users
mailing list