Fatal Python Error Py_initialize Unable To Set The Locale Encoding
Contents |
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this uwsgi fatal python error: py_initialize: unable to get the locale encoding site About Us Learn more about Stack Overflow the company Business Learn more about python importerror no module named encodings hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is fatal python error: py_initialize: unable to get the locale encoding ubuntu a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best unable to get the locale encoding importerror no module named 'encodings' answers are voted up and rise to the top Bash tries to run python on unknown command and fails in Py_Initialize up vote 3 down vote favorite 1 Running Ubuntu 14.04 and updater says that all software is up to date. Have tried rebooting. I am preparing for a class that uses Python. I have installed it and it works fine. However, I now have this
Py_initialize Unable To Load The File System Codec
problem: When I type an unknown command into bash, I get a python error: cliff@Climate:~$ UnknownProgram Fatal Python error: Py_Initialize: Unable to get the locale encoding File "/usr/lib/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Aborted cliff@Climate:~$ env | grep -i python PYTHONPATH=/usr/lib/pymodules/python2.7:/usr/lib/python2.7 cliff@Climate:~$ which UnknownProgram cliff@Climate:~$ which python /usr/bin/python cliff@Climate:~$ python --version Python 2.7.6 cliff@Climate:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games I think that pycharm also installed some python3 on the box. I have found that /usr/lib/command-not-found includes a shebang for python3. I guess that it is somehow picking up the wrong Py_Initialize file. How do I correct this since I need python 2.7 for the class? bash python share|improve this question edited Sep 2 '14 at 20:26 dan08 3,66011435 asked Sep 2 '14 at 19:17 user145510 4614 are you sure there's not a file called UnknownProgram? which does not tell you if it exists. –wxl Sep 2 '14 at 19:20 Is UnknownProgram the actual name for something? If not, can you provide us with the program you're actually calling? –Mitch Sep 2 '14 at 19:36 Why did you install Python? Ubuntu comes with Python preinstalled .(at least it should, since many s
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Blender Importerror: No Module Named 'encodings'
site About Us Learn more about Stack Overflow the company Business Learn more importerror: no module named 'encodings' ubuntu about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x could not find platform independent libraries
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/39171616/ubuntu-apache2-django-fatal-python-error-py-initialize-unable-to-get-the Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, unable to helping each other. Join them; it only takes a minute: Sign up Ubuntu , Apache2 , Django ) Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' up vote 0 down vote favorite I'm trying to set up my django(1.8) application with AWS EC2 having Ubuntu 14.04 , Apache2 , python 3.4. the locale encoding When I run 'sudo service apache2 start' , the page keeps re-loading and the same error message is stacking at '/var/log/apache2/error.log'. The error message is [Fri Aug 26 2016] [mpm_event:notice] [pid n:tid m] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/4.5.5 Python/3.4.3 configured -- resuming normal operations [Fri Aug 26 2016] [core:notice] [pid n:tid m] AH00094: Command line: '/usr/sbin/apache2' Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' My configuration is below : I added one line: 'Include /etc/apache2/httpd.conf' at the bottom of '/etc/apache2/apache2.conf'. '/etc/apache2/httpd.conf' : WSGIScriptAlias / /home/ubuntu/project/project/project/wsgi.py WSGIDaemonProcess project python-path=/home/ubuntu/project/project WSGIProcessGroup project WSGIPythonHome /usr/bin/python3.4