# Add python-version specific environment variable

**URL:** https://travis-ci.community/t/add-python-version-specific-environment-variable/14157
**Category:** Environments
**Tags:** python
**Created:** [February 2, 2024, 9:02am UTC](https://travis-ci.community/t/add-python-version-specific-environment-variable/14157 "2024-02-02T09:02:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![buhtz](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/buhtz/32/8238_2.png) [@buhtz](https://travis-ci.community/u/buhtz)
#### Post date: [February 2, 2024, 9:02am UTC](https://travis-ci.community/t/add-python-version-specific-environment-variable/14157/1 "2024-02-02T09:02:34Z")

</div>

I am still struggling with the basics of TravisCI. There really should be a GUI or frontend that prevents users from writing corrupt configs.

```auto
language: python
os: linux
dist: focal

arch:
 - amd64
 - ppc64le

env:
  PYTHONUNBUFFERED=1

python:
  - "3.8"
  - "3.9"
  - "3.11"

jobs:
  include:
    - python: "3.8"
      env: SYSTEM_SITE_PACKAGES=true

```

3 Python versions x 2 architectures should result in 6 jobs. But it don’t. There are more jobs.  
Becuase Python 3.8 runs multiple times once with “SYSTEM\_SITE\_PACKAGES” and once with “PYTONUNBUFFERED”.

But I want both variables in on job together. I defined PYTHONUNBUFFERED globally. And SYSTEM\_SITE\_PACKAGES should be added to env just for Python 3.8. Logical to me but seems not for Travis.

**EDIT** : I assume that TravisCI use a paradigm that is very different from the one do have in my mind. I really try to understand. I just want Travis to mix “arch” and “python” in all combinations and then add(!) to this implicit configuration some extras (e.g. the “env” element for Python “3.8” on both(!) architectures).
