I wanted to install Django in a virtual environment, performed a sequence of actions:

  1. virtualenv --no-site-packages djangokurs
  2. cd djangokurs/
  3. source bin/activate
  4. easy_install django

Then the error ( screenshot ) took off:

 Traceback (most recent call last): File "/home/nicl/Документы/Python/kurs/djangokurs/bin/easy_install", line 11, in <module> sys.exit(main()) File "/home/nicl/Документы/Python/kurs/djangokurs/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 2291, in main **kw File "/home/nicl/anaconda3/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/home/nicl/anaconda3/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/home/nicl/anaconda3/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/nicl/Документы/Python/kurs/djangokurs/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 409, in run self.easy_install(spec, not self.no_deps) [...] File "/home/nicl/Документы/Python/kurs/djangokurs/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 800, in install_script self.write_script(script_name, _to_ascii(script_text), 'b') File "/home/nicl/Документы/Python/kurs/djangokurs/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 105, in _to_ascii return s.encode('ascii') UnicodeEncodeError: 'ascii' codec can't encode characters in position 13-21: ordinal not in range(128) 

    1 answer 1

    It was all too easy. Russian name of the folder "Documents" prevented

    • Strictly speaking, this is not a solution to the problem, but its avoidance - andreymal
    • one
      @andreymal it really doesn't work like that. On python2 crashes when trying to create virtualenv, on python3 when installing packages. I think there is more cant around pip / easy_install. For a good one, you need to report a bug - FeroxTL