2

when i tried to install netfilterqueue this error came up. even i can't uninstall/check/install using pip.
And i searched over the stackoverflow and one of those said use :

sudo pip install -U setuptools

And again this error came up.

  Traceback (most recent call last):
      File "/usr/bin/pip", line 33, in <module>
        sys.exit(load_entry_point('pip==20.1.1', 'console_scripts', 'pip')())
      File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
        command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
      File "/usr/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
        module = importlib.import_module(module_path)
      File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 783, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/usr/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
        from pip._internal.cli.req_command import RequirementCommand, with_cleanup
      File "/usr/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 20, in <module>
        from pip._internal.operations.prepare import RequirementPreparer
      File "/usr/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 15, in <module>
        from pip._internal.distributions import (
      File "/usr/lib/python3.8/site-packages/pip/_internal/distributions/__init__.py", line 2, in <module>
        from pip._internal.distributions.wheel import WheelDistribution
      File "/usr/lib/python3.8/site-packages/pip/_internal/distributions/wheel.py", line 5, in <module>
        from pip._internal.utils.wheel import pkg_resources_distribution_for_wheel
      File "/usr/lib/python3.8/site-packages/pip/_internal/utils/wheel.py", line 12, in <module>
        from pip._vendor.six import PY2, ensure_str
    ImportError: cannot import name 'ensure_str' from 'six' (/usr/lib/python3.8/site-packages/six.py)

Thanks in advance.

Jaswanth
  • 21
  • 2
  • Which version of six you are using, you can check it by `pip freeze` command. 'ensure_str' is included in `six 1.12` and forward – Rahul Raut Aug 26 '20 at 04:41
  • try running `pip install six==1.12.0` or greater https://stackoverflow.com/questions/57251430/attributeerror-module-object-has-no-attribute-ensure-str/57262415#57262415 – Rahul Raut Aug 26 '20 at 04:43
  • Same error....i can't run any options/arguments using pip command.Error shows up . – Jaswanth Aug 26 '20 at 04:50

1 Answers1

-1

I was able to make this work by copying six.py from https://github.com/benjaminp/six.git into /usr/lib/python3.8/six.py ... you'll need sudo to create or update this file.