简体   繁体   中英

./runtests (in django) ImportError: cannot import name 'NullTimeKeeper'

The following command was executed in the tests directory inside the development version of django

./runtests.py
Traceback (most recent call last):
  File "./runtests.py", line 26, in <module>
    from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
ImportError: cannot import name 'NullTimeKeeper'

I am using python 3.8 and am following the instructions for contributing to django from https://docs.djangoproject.com/en/3.1/intro/contributing/ where I have resolved all errors up to this point. Could someone explain what I would have to do as I already ran

python3.8 -m pip install -r requirements/py3.txt

in my virtual environment that I created using

python3.8 -m venv /path/to/venv

Never mind I found the answer. It is solved by configuring python3 to 3.8 version instead of 3.6 in the following link configuring python and then executing all of this in the virtual environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM