Reputation: 225
I have created a simple django project using poetry in my local machine , the pyproject.toml
is the following
[tool.poetry]
name = "vending-machine-api"
version = "0.1.0"
description = ""
authors = ["mohamed ibrahim"]
readme = "README.md"
packages = [{include = "vending_machine_api"}]
[tool.poetry.dependencies]
python = "^3.10"
django = "^4.1.3"
django-rest-knox = "^4.2.0"
djangorestframework = "^3.14.0"
django-model-utils = "^4.3.1"
drf-access-policy = "^1.3.0"
pre-commit = "^2.20.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
It has my python3.10 from this machine i have created the project from I'm trying to run the project from another machine which has python version 3.9 but I 'm getting this error
The currently activated Python version 3.9.6 is not supported by the project (^3.10).
Is there any way to add the python version from created project to be compatible with older versions ?
Upvotes: 1
Views: 472
Reputation: 882
It's not using an environment variable like you asked, but this solved the issue of incompatibility:
python = ">=3.9,<3.11"
to add a range of compatible python versions
Upvotes: 2