The question is published on by Tutorial Guruji team.
I have installed python3.3 with commands:
sudo apt-get install python-software-properties sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update sudo apt-get install python3.3
It works,but python2.7 installed in ubuntu by default still exiet.When I type “python”,it show me the interactive shell of python2.7. I can use python3.3 by type “python3.3”,but i can’t import some library,such as gtk,Qt.but it works in 2.7.
Now I want to remove python2.7,it show me that it will free 247M,which beyond my expection.If I did it,any important library would be removed togeter?
How to use the Qt library with python3.3 instead of 2.7?
Thank you for answering!
Answer
Completely removing python 2.7 is not the best option, as it is default python version for ubuntu and you might end breaking some python-dependent utilities and programs.
Consider using virtual environment manager for different libraries management. I use pyenv for python versions management and virtualenvwrapper for python packages management.
For example running
export PATH=/path/to/python3 source /usr/local/bin/virtualenvwrapper.sh mkvirtualenv test --no-site-packages
will make a clean virtual environment for you, where you can install any needed packages, sucha as Qt
.