Python tox doesn't build anymore

I have a python test suite running with tox and since this morning test suite do not run any longer and return the following error.

AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython3macOsFramework'

I did try to fix python, tox and virtualenv version to make sure it was not a versioning issue, but whatever I do that runs locally (and used to run on CircleCI) doesn’ t run on CircleCI anylonger.

Any hint would be much appreciated.

1 Like

I too am now experiencing this issue for a Python 3.6 Django project. The error came out of nowhere and I am unsure of how to fix it.

Could you share your entire config here?

See relevant configuration here after.


version: 2.1

      - image: circleci/python:latest
    working_directory: ~/repo
      - checkout
      - run:
          name: install dependencies
          command: |
            pipenv install --system --dev
      - run:
          name: run tests
          command: |


legacy_tox_ini = """
minversion = 3.14.5
envlist = py27,py37,py38

deps = pytest
commands =
  python clean --all build_ext --force --inplace
  {posargs:pytest -vv --ignore=src}
passenv = *

I just found out that the problem is with tox 3.14.5 and CircleCI.
Setting tox = "!=3.14.5 in project dependencies resolves the issue on CircleCI.

1 Like

Thanks for sharing your workaround!

1 Like

Same AttributeError here but not using tox.

Seems to occur on pipenv sync for me:

pipenv sync --dev
Creating a virtualenv for this project…
Pipfile: /home/********/app/Pipfile
Using /usr/local/bin/python3 (3.7.7) to create virtualenv…
AttributeError: module 'virtualenv.create.via_global_ref.builtin.cpython.mac_os' has no attribute 'CPython3macOsFramework'

For me it seems that upgrading virtualenv seemed to resolve the issue. I added this to my config.yml:

pip install pip -U
pip install pipenv -U
pip install virtualenv -U

seems there was a bad build of virtualenv issued a while ago, where the fix is already out.

virtualenv is the most likely guilty indeed

tox latest release, 3.14.6, resolved the issue by excluding some specific virtualenv versions, see for more details.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.