diff --git a/README.rst b/README.rst index e80e4476..128e44ee 100644 --- a/README.rst +++ b/README.rst @@ -50,8 +50,8 @@ Notes Pyethapp runs on Python 2.7. If you don't know how to install an up-to-date version of Python, have a look -`here `__. It is always -advised to install system-dependecies with the help of a package manager +`here `__. The minimum required version is ``2.7.9``. +It is always advised to install system-dependecies with the help of a package manager (e.g. *homebrew* on Mac OS X or *apt-get* on Debian). Please install a *virtualenv* environment for a comfortable Pyethapp diff --git a/pyethapp/app.py b/pyethapp/app.py index 86b82792..aeee1641 100644 --- a/pyethapp/app.py +++ b/pyethapp/app.py @@ -32,8 +32,10 @@ from pyethapp.utils import merge_dict, load_contrib_services, FallbackChoice import utils -log = slogging.get_logger('app') +# minimum required python version +PY_VERSION = '2.7.9' +log = slogging.get_logger('app') services = [DBService, AccountsService, NodeDiscovery, PeerManager, ChainService, PoWService, JSONRPCServer, IPCRPCServer, Console] @@ -86,6 +88,12 @@ def app(ctx, profile, alt_config, config_values, alt_data_dir, log_config, boots # configure logging slogging.configure(log_config, log_json=log_json, log_file=log_file) + # check if minimum required python version + required_version = tuple(map(int, PY_VERSION.split('.'))) + if sys.version_info < required_version: + log.fatal('python version must be at least {}'.format(PY_VERSION)) + sys.exit(1) + # data dir default or from cli option alt_data_dir = os.path.expanduser(alt_data_dir) data_dir = alt_data_dir or konfig.default_data_dir