I get the same python version after installed and activated virtualenv with different python version

I get the same python version after installed and activated virtualenv with different python version



I want to use a different python version in a virtual environment. I usually create a new environment and set the python version I want. But now, in a new machine I'm working, it doesn't work. I install a venv with python3.5, activate it, but it still uses the default python3.6


virtualenv --python=python3.5 testenv
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in /home/mwon/testenv/bin/python3.5
Also creating executable in /home/mwon/testenv/bin/python
Installing setuptools, pip, wheel...done.



then


source testenv/bin/activate



result:


python
Python 3.6.5 (default, Mar 29 2018, 03:28:50)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>



EDIT:



Distro:


DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"



Python version:


Python 3.6.5





What system (OS, distro, etc.) is this? Can you post the full log of virtualenv --python=python3.5 newtestenv; source newtestenv/bin/activate; python --version; which python?
– AKX
Sep 3 at 16:30


virtualenv --python=python3.5 newtestenv; source newtestenv/bin/activate; python --version; which python





16.04.3 LTS (Xenial Xerus). How to I get the full log of virtualenv? The default python version if the 3.6.5
– Miguel
Sep 3 at 16:35





I mean, just copy-paste the terminal output as-is into a code block.
– AKX
Sep 3 at 16:37





The terminal output is the one I show in the main question. The same for the other commands. Just updated the distrib.
– Miguel
Sep 3 at 16:39





Do you have python defined as an alias? Check the output of type python.
– jwodder
Sep 3 at 16:59


python


type python






Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ