You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a virtualenv problem, or a tox problem, but when both are installed I can't use tox to create a testing environment.
When running tox I'm getting the following error:
File "/usr/local/lib/python3.6/dist-packages/virtualenv/util/path/_sync.py", line 7, in <module>
from six import PY2, PY3, ensure_text
ImportError: cannot import name 'ensure_text'
Minimal reproducible example
Builld the following Dockerfile:
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y \
python3 \
python3-pip \
python3-dev
RUN pip3 install -U pip
RUN pip3 install -U tox
RUN pip list
# The following is a command tox would normally call:RUN /usr/bin/python3 -m virtualenv --no-download --python /usr/bin/python3 .package
pip list of the environment where virtualenv is installed into if not using the zipapp
Output of the virtual environment creation with the -vvv --with-traceback flags included
Step 7/7 : RUN /usr/bin/python3 -m virtualenv -vvv --with-traceback --no-download --python /usr/bin/python3 .package
---> Running in e03940f2d861
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/local/lib/python3.6/dist-packages/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run
File "/usr/local/lib/python3.6/dist-packages/virtualenv/run/__init__.py", line 5, in <module>
from ..config.cli.parser import VirtualEnvConfigParser
File "/usr/local/lib/python3.6/dist-packages/virtualenv/config/cli/parser.py", line 6, in <module>
from ..ini import IniConfig
File "/usr/local/lib/python3.6/dist-packages/virtualenv/config/ini.py", line 8, in <module>
from virtualenv.dirs import default_config_dir
File "/usr/local/lib/python3.6/dist-packages/virtualenv/dirs.py", line 5, in <module>
from virtualenv.util.lock import ReentrantFileLock
File "/usr/local/lib/python3.6/dist-packages/virtualenv/util/lock.py", line 11, in <module>
from virtualenv.util.path import Path
File "/usr/local/lib/python3.6/dist-packages/virtualenv/util/path/__init__.py", line 5, in <module>
from ._sync import copy, copytree, ensure_dir, link, symlink
File "/usr/local/lib/python3.6/dist-packages/virtualenv/util/path/_sync.py", line 7, in <module>
from six import PY2, PY3, ensure_text
ImportError: cannot import name 'ensure_text'
The text was updated successfully, but these errors were encountered:
I'm not sure if this is a virtualenv problem, or a tox problem, but when both are installed I can't use tox to create a testing environment.
When running
tox
I'm getting the following error:Minimal reproducible example
Builld the following Dockerfile:
pip list
of the environment where virtualenv is installed into if not using the zipappOutput of the virtual environment creation with the
-vvv --with-traceback
flags includedThe text was updated successfully, but these errors were encountered: