2
$\begingroup$

I'm working on Ubuntu 14.04 LTS. I downloaded Blender 2.76b and deleted the python directory to push blender to use the system distribution of python.

Ubuntu comes with both python 2 and 3, but the python command is linked to 2.7 on my system.

When I try to start the blender application, I get the following message:

connect failed: No such file or directory
Read new prefs: /home/alex/.config/blender/2.76/config/userpref.blend
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)

How can I troubleshoot this issue? I'm thinking it's a pythonpath problem but I'm not sure what path the blender app is looking for when it starts, python or python3. Thanks for the help!

EDIT

I tried deleting the python dir and then running the following:

sudo ln -s /usr/lib/python3.4 

in the same directory, giving me a symlink to python3.4. Unfortunately, I still get the same error on running blender.

Alex

$\endgroup$
  • $\begingroup$ @batFINGER I tried your suggestion but unfortunately got the same error. I'm using the standard distributed version that I downloaded from the site today. $\endgroup$ – Alex Barry Dec 11 '15 at 2:09
  • $\begingroup$ Does your python have the encodings module? >>>import encodings $\endgroup$ – batFINGER Dec 11 '15 at 2:21
  • $\begingroup$ Yes, this runs with no errors in both python and python3 command line interpreters $\endgroup$ – Alex Barry Dec 11 '15 at 3:07
  • $\begingroup$ Oops, the python folder when installing blender has python/bin containing python3.4m (executable) and python/lib/python3.4/ containing the library. Blender python also worked on my system after removing the python folder (for both 2.76 versions one using 3.4 one using 3.5). The main thing is you need the same version blender expects. The python on my system when I run python3.4 is 3.4.2. Lastly, did blender work ok when you used the blender installed python folder? $\endgroup$ – batFINGER Dec 11 '15 at 3:40
  • $\begingroup$ My version is 3.4.3. And yes, it did work out of the box. How can I pull my python version back to 3.4.2? $\endgroup$ – Alex Barry Dec 11 '15 at 4:09
1
$\begingroup$

All right... I had the same error appearing today and I have been able to solve it. It's been pretty easy. After removing blender and installing blender from ppa:thomas-schiex/blender There were some files still around. To make sure everything works try:

sudo apt-get purge blender
cd /usr/lib
sudo rm -r blender
sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update
sudo apt-get install blender

Since everything is purged AND manually removed from versions installed manually it should be fine now. Have fun :)

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.