2016-04-30 6 views
1

Ich habe pip3, python-dev und nginx installiert.OSError: locale.Error - nicht unterstützte Gebietsschemaeinstellungen

Als nächstes installierte ich virtualenv mit pip3.

Ich möchte virtualenv machen, aber wenn ich folgenden Befehl eingeben:

virtualenv project_juda 

nächste Fehler angezeigt:

[email protected]:~/MyApp$virtualenv project_juda 
Using base prefix '/usr' 
New python executable in /home/juldou/MyApp/project_juda/bin/python3 
Not overwriting existing python script /home/juldou/MyApp/project_juda/bin/python (you must use /home/juldou/MyApp/project_juda/bin/python3) 
Installing setuptools, pip, wheel... 
    Complete output from command /home/juldou/MyApp/project_juda/bin/python3 - setuptools pip wheel: 
    Traceback (most recent call last): 
    File "<stdin>", line 23, in <module> 
    File "/usr/local/lib/python3.4/dist-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/__init__.py", line 215, in main 
    File "/home/juldou/MyApp/project_juda/lib/python3.4/locale.py", line 592, in setlocale 
    return _setlocale(category, locale) 
locale.Error: unsupported locale setting 
---------------------------------------- 
...Installing setuptools, pip, wheel...done. 
Traceback (most recent call last): 
    File "/usr/local/bin/virtualenv", line 11, in <module> 
    sys.exit(main()) 
    File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 708, in main 
    symlink=options.symlink) 
    File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 941, in create_environment 
    download=download, 
    File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 897, in install_wheel 
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) 
    File "/usr/local/lib/python3.4/dist-packages/virtualenv.py", line 792, in call_subprocess 
    % (cmd_desc, proc.returncode)) 
OSError: Command /home/juldou/MyApp/project_juda/bin/python3 - setuptools pip wheel failed with error code 1 

Ich weiß nicht, warum. Wo ist das Problem?

UPDATE: Ausgabe von locale:

[email protected]:~/MyApp$ locale 
locale: Cannot set LC_ALL to default locale: No such file or directory 
LANG=en_US.UTF-8 
LANGUAGE= 
LC_CTYPE="en_US.UTF-8" 
LC_NUMERIC=sk_SK.UTF-8 
LC_TIME=sk_SK.UTF-8 
LC_COLLATE="en_US.UTF-8" 
LC_MONETARY=sk_SK.UTF-8 
LC_MESSAGES="en_US.UTF-8" 
LC_PAPER=sk_SK.UTF-8 
LC_NAME=sk_SK.UTF-8 
LC_ADDRESS=sk_SK.UTF-8 
LC_TELEPHONE=sk_SK.UTF-8 
LC_MEASUREMENT=sk_SK.UTF-8 
LC_IDENTIFICATION=sk_SK.UTF-8 
LC_ALL= 
+1

Was ist die Ausgabe des Befehls 'locale'? (Beachten Sie, das ist kein Python-Befehl, es ist ein UNIX-Befehl). –

+0

@MartijnPieters Aktualisiert. –

+0

[Wie behebe ich mein Gebietsschema Problem?] (Http://askubuntu.com/q/162391) sieht hier relevant aus. –

Antwort

1

ich folgende Lösung über bei ubuntuforums gefunden habe:

export LANGUAGE=en_US.UTF-8 
export LANG=en_US.UTF-8 
export LC_ALL=en_US.UTF-8 
locale-gen en_US.UTF-8 
sudo dpkg-reconfigure locale 

und es ist für mich gearbeitet!

+2

Ja, 'locale-gen' ist was du brauchst. Scheint so, als hättest du keine Locales installiert. Die 'Exporte' sind jedoch unnötig. – totoro