Importing module from another subdirectory
dieter at handshake.de
Wed Apr 24 01:47:53 EDT 2019
Rich Shepard <rshepard at appl-ecosys.com> writes:
> On Tue, 23 Apr 2019, dieter wrote:
> One project is for my own use and I understand now that a virtualenv with
> its own sys.path appendices would work.
Those are two separate approaches:
With a "virtualenv", there is usually no need to tweak "sys.path" --
you simply install everything your project needs into the "virtualenv".
"sys.path" tweaks are typically employed with a "central"
Python installation, to have it look at non-standard places for
module/packages under specific circumstances.
> The other project is intended to be
> available for installation and use by clients (most of whom work in a
> Windows environment) so I need to learn how development in a virtual
> environment affects ultimate distribution via github.
A "virtual environment" behaves like a typical Python installation
(it is just somewhat isolated). Thus, there is no problem
to install a package developped in a "virtual environment"
into any Python environment -- aport from potential name conflicts
(choose appropriate names to reduce this risk).
More information about the Python-list