XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
77 stars 134 forks source link

README instructions may be overly-specific about python executable #625

Open alxndrsn opened 1 year ago

alxndrsn commented 1 year ago

Current README instructions says:

The currently supported Python versions for pyxform are 3.7, 3.8 and 3.9.

and then later:

/usr/local/bin/python3.8 -m venv venv

and

/usr/local/bin/python3.8 -m venv pyxform-release

The latter examples seem overly-specific, and there are various other code samples which reference the python executable as simply python.

Is there something specific to using /usr/local/bin/python3.8, or could these be replaced with python?

lognaturel commented 1 year ago

That annoyed me as well the other day. Should just be python!

lindsay-stevens commented 1 year ago

It's that way mainly because pyxform supports specific python versions. Also, my (somewhat old) dev box has system python resolve to v2.7.5 and I've got python3.6, python3.7, python3.8, python3.9 binaries under /usr/local/bin.

After activating a virtual environment, it's possible to use just python and it resolves to the version that the venv was created with. So specifying the version like this is only a thing when creating a virtualenv for the first time. Once that's done you can henceforth write source ./venv/bin/activate then python ....