Re: NameError: name '__version__' is not defined

2023-10-27 Thread Dieter Maurer via Python-list
Loris Bennett wrote at 2023-10-27 09:29 +0200: > ... >For the application with the system Python this mechanism works, but for >the non-system Python I get the error: > > NameError: name '__version__' is not defined If you get exceptions (they usually end in `Error` (such as `Nam

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
>> import importlib_metadata >> >> __version__ = importlib_metadata.version(__name__) >> >> For the application with the system Python this mechanism works, but for >> the non-system Python I get the error: >> >> NameError: name '__version__'

Re: NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
For the application with the system Python this mechanism works, but for > the non-system Python I get the error: > > NameError: name '__version__' is not defined > > For the 3.6 application I have > > PYTHONPATH=/nfs/local/lib/python3.6/site-packages > PYTHONUSER

NameError: name '__version__' is not defined

2023-10-27 Thread Loris Bennett via Python-list
: NameError: name '__version__' is not defined For the 3.6 application I have PYTHONPATH=/nfs/local/lib/python3.6/site-packages PYTHONUSERBASE=/nfs/local PYTHON_VERSION=3.6 PYTHON_VIRTUALENV= and for the 3.10 application I have PYTHONPATH=/nfs/easybuild/software/Python/3.10.8-GCCcore