i'm writing python program contains several folders , has become big enough making package makes sense (so intra-module imports work).
the project pretty consists of:
project_folder/ - setup.py - source_code/ - somecode.py - __init__.py - inputs/ - input_image.png - input_text.conf - __init__.py - outputs/ - __init__.py now problem have when install package
python setup.py install the package in /usr/local/lib/... folder don't have permission save outputs python without running elevated privileges. not that, changing inputs overly complicated average user.
so first solution thought of have separate folder somewhere in /home directory inputs , outputs directory stored. however, makes installation more difficult user has go source_code directory , change of paths describe inputs located.
am missing obvious here, or there no solution easy in every case?
is there way make intra-package imports work without installing package on setup.py?
use --user switch of install command. puts files in $home/.local instead of /usr/local. read more here.
you may have add $home/.local/bin path environment variable.
Comments
Post a Comment