0
Python Version Problems on Ubuntu
Hi community, I'm using Ubuntu 16.04 which has python 2.7 as default installed. To use other Tools I had to get 3.5 however. for python 3 I have to use pip3 as command, for python 2 only pip. now somehow both commands, pip and pip3, refer both to python 3.5. However pip is telling me to update pip itself, which doesn't work. pip always stays on 8.1 after Update. I assume the pathing got mixed up somehow. Is there a way to fix that issue and prevent it from occurring again? best regards, Alex
1 ответ
+ 5
Yes, it is most likely linked to the PYTHONPATH variable which got overwritten when you installed the Py3.
Depending on which solution suits you best:
https://stackoverflow.com/questions/34632870/how-to-set-pythonpath-differently-for-version-2-and-3
I would not change the PYTHONPATH variable, but rather looked for a workaround. Invoking a virtual environment sounds best for me, I'd go for it, personally.