Pytest-3.3.2 using python 2.7
up vote
0
down vote
favorite
I have just installed Ubuntu for WSL, mainly to be able to use linux commands while i learn coding in python, and in particular git and pytest.
I installed pytest using the bash shell, and even though i have python 3.7 installed, when running pytest, it uses python 2.7:
Python 2.7.15rc1, pytest-3.3.2
when running pytest from windows CMD, it runs a different version of pytest python 3.7
Python 3.7.0, pytest-3.10.0
i realise this could be a very stupid question, but this is my first foray into linux based apps, and i would like to know how i can run pytest with the latest python version from the bash shell. I read some posts and have already tried:
python3 -m pytest
python3.7 -m pytest
but get the following message:
/usr/bin/python3: No module named pytest
Can somebody help me please?
thank you
ubuntu pytest windows-subsystem-for-linux
add a comment |
up vote
0
down vote
favorite
I have just installed Ubuntu for WSL, mainly to be able to use linux commands while i learn coding in python, and in particular git and pytest.
I installed pytest using the bash shell, and even though i have python 3.7 installed, when running pytest, it uses python 2.7:
Python 2.7.15rc1, pytest-3.3.2
when running pytest from windows CMD, it runs a different version of pytest python 3.7
Python 3.7.0, pytest-3.10.0
i realise this could be a very stupid question, but this is my first foray into linux based apps, and i would like to know how i can run pytest with the latest python version from the bash shell. I read some posts and have already tried:
python3 -m pytest
python3.7 -m pytest
but get the following message:
/usr/bin/python3: No module named pytest
Can somebody help me please?
thank you
ubuntu pytest windows-subsystem-for-linux
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have just installed Ubuntu for WSL, mainly to be able to use linux commands while i learn coding in python, and in particular git and pytest.
I installed pytest using the bash shell, and even though i have python 3.7 installed, when running pytest, it uses python 2.7:
Python 2.7.15rc1, pytest-3.3.2
when running pytest from windows CMD, it runs a different version of pytest python 3.7
Python 3.7.0, pytest-3.10.0
i realise this could be a very stupid question, but this is my first foray into linux based apps, and i would like to know how i can run pytest with the latest python version from the bash shell. I read some posts and have already tried:
python3 -m pytest
python3.7 -m pytest
but get the following message:
/usr/bin/python3: No module named pytest
Can somebody help me please?
thank you
ubuntu pytest windows-subsystem-for-linux
I have just installed Ubuntu for WSL, mainly to be able to use linux commands while i learn coding in python, and in particular git and pytest.
I installed pytest using the bash shell, and even though i have python 3.7 installed, when running pytest, it uses python 2.7:
Python 2.7.15rc1, pytest-3.3.2
when running pytest from windows CMD, it runs a different version of pytest python 3.7
Python 3.7.0, pytest-3.10.0
i realise this could be a very stupid question, but this is my first foray into linux based apps, and i would like to know how i can run pytest with the latest python version from the bash shell. I read some posts and have already tried:
python3 -m pytest
python3.7 -m pytest
but get the following message:
/usr/bin/python3: No module named pytest
Can somebody help me please?
thank you
ubuntu pytest windows-subsystem-for-linux
ubuntu pytest windows-subsystem-for-linux
asked Nov 10 at 16:48
learning to code
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
thank you
in fact i did the following and it worked:
- apt install python 3 pip
- sudo apt install python3-test
after that, it will refer to the latest python version when calling pytest
- python -m pytest -v
New contributor
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
thank you
in fact i did the following and it worked:
- apt install python 3 pip
- sudo apt install python3-test
after that, it will refer to the latest python version when calling pytest
- python -m pytest -v
New contributor
add a comment |
up vote
0
down vote
thank you
in fact i did the following and it worked:
- apt install python 3 pip
- sudo apt install python3-test
after that, it will refer to the latest python version when calling pytest
- python -m pytest -v
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
thank you
in fact i did the following and it worked:
- apt install python 3 pip
- sudo apt install python3-test
after that, it will refer to the latest python version when calling pytest
- python -m pytest -v
New contributor
thank you
in fact i did the following and it worked:
- apt install python 3 pip
- sudo apt install python3-test
after that, it will refer to the latest python version when calling pytest
- python -m pytest -v
New contributor
New contributor
answered Nov 11 at 17:15
learning to code
1
1
New contributor
New contributor
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53241171%2fpytest-3-3-2-using-python-2-7%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown