I installed Python 3.5 from source and broke a number of modules on Python 3.4, which unfortunately, was an essential part of Ubuntu. I've been trying to fix the system, now I'm almost there, with (hopefully) the last problem: My Python 3.4 only recognize C modules with name *.cpython-34m.so
, while all packages from Ubuntu repository are named *.cpython-34m-x86_64-linux-gnu.so
. It seems that the cpython-34m
stuff is the full name of Python, so I need to change it in accord with Ubuntu's expectation. How can I achieve this?

- 1,603
- 14
- 20
-
Is installing two versions of Python in parallel out of question? – Robus Sep 25 '15 at 07:55
-
@Robus The two Python installations didn't overwrite each other's file. That's all I know. – Huazuo Gao Sep 25 '15 at 08:07
-
Surely Python 3.5 has been installed `/usr/local/`? If so, remove 3.5 and check everything is working correctly – Alastair McCormack Sep 25 '15 at 08:42
-
@AlastairMcCormack I don't think Python can be easily removed, since Python's makefile has no `uninstall` target. – Huazuo Gao Sep 25 '15 at 08:55
-
True, but you should be able to find the majority of the install by hand. E.g. remove `/usr/local/bin/python`, `/usr/local/lib/python` etc – Alastair McCormack Sep 25 '15 at 08:57
3 Answers
What you are trying makes no sense. The name cannot be changed, for a good reason. The reason the names are different is to prevent incompatible versions from mixing up each other. You can compile a different version with different options and then the name will be different, too.

- 175,061
- 34
- 275
- 318
The essence of the package management is to satisfy all dependencies through the repositories. Theoretically there should be no need to install anything from the sources.
If you need a different Python version for some specifical reasons, virtual environments would be the thing to look for:

- 11,616
- 6
- 48
- 84
I reinstalled Python 3.4 via Ubuntu package system, and suddenly everything worked fine. I still have no clue how Ubuntu customize its own Python, since Python's configure
command has no related option at all. Anyway, it works, so why bother :P. Finally, thank you for helping me with this problem.

- 1,603
- 14
- 20