1

I want to install virtualenv and virtualenvwrapper with pip on ubuntu 16.4. I have been install python3.6, python3.7 and python3.8 in my machine. I try these commands:

sudo python3.6 -m pip install virtualenv virtualenvwrapper
sudo python3.7 -m pip install virtualenv virtualenvwrapper
sudo python3.8 -m pip install virtualenv virtualenvwrapper

But all of them made a a same error like this(notice this is error for run with python3.7):

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/pip/__main__.py", line 19, in <module>
    sys.exit(pip.main())
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.7/locale.py", line 608, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

What should I do?

Also I couldn't install any package with pip !

rahnama7m
  • 865
  • 10
  • 38

1 Answers1

0

Your answer exist in this question.

This error raise since you didn't set lacales vaiables in your system. Run this line of code in your bash:

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales

Hope its help!

Amir Abdollahi
  • 455
  • 3
  • 5
  • 18