Cant import module from python console unless entered via CMD [duplicate]
This question already has an answer here:
Can't find the modules that have been installed by pip
1 answer
I installed a module with command
pip install serial
And it appears to have been successful.
I can open up a cmd and enter python
and then import serial
without any issues.
However, if I open up either
- Python 3.6 (64-bit)
- Python 3.6 (32-bit)
- IDLE (Python 3.6 64-bit)
- IDLE (Python 3.6 32-bit)
And try the same command (import serial
) I get an annoying
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'serial'
What is going on here?
python python-3.x pip
marked as duplicate by Baum mit Augen, Community♦ Nov 12 '18 at 14:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Can't find the modules that have been installed by pip
1 answer
I installed a module with command
pip install serial
And it appears to have been successful.
I can open up a cmd and enter python
and then import serial
without any issues.
However, if I open up either
- Python 3.6 (64-bit)
- Python 3.6 (32-bit)
- IDLE (Python 3.6 64-bit)
- IDLE (Python 3.6 32-bit)
And try the same command (import serial
) I get an annoying
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'serial'
What is going on here?
python python-3.x pip
marked as duplicate by Baum mit Augen, Community♦ Nov 12 '18 at 14:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What doespython --version
show from cmd?
– Mad Physicist
Nov 12 '18 at 14:07
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
@MadPhysicist It saysPython 2.7.15
- I guess my path is wrong?
– Bassie
Nov 12 '18 at 14:09
add a comment |
This question already has an answer here:
Can't find the modules that have been installed by pip
1 answer
I installed a module with command
pip install serial
And it appears to have been successful.
I can open up a cmd and enter python
and then import serial
without any issues.
However, if I open up either
- Python 3.6 (64-bit)
- Python 3.6 (32-bit)
- IDLE (Python 3.6 64-bit)
- IDLE (Python 3.6 32-bit)
And try the same command (import serial
) I get an annoying
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'serial'
What is going on here?
python python-3.x pip
This question already has an answer here:
Can't find the modules that have been installed by pip
1 answer
I installed a module with command
pip install serial
And it appears to have been successful.
I can open up a cmd and enter python
and then import serial
without any issues.
However, if I open up either
- Python 3.6 (64-bit)
- Python 3.6 (32-bit)
- IDLE (Python 3.6 64-bit)
- IDLE (Python 3.6 32-bit)
And try the same command (import serial
) I get an annoying
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'serial'
What is going on here?
This question already has an answer here:
Can't find the modules that have been installed by pip
1 answer
python python-3.x pip
python python-3.x pip
edited Nov 12 '18 at 14:12
Mehrdad Pedramfar
4,96211237
4,96211237
asked Nov 12 '18 at 14:05
BassieBassie
3,7931946
3,7931946
marked as duplicate by Baum mit Augen, Community♦ Nov 12 '18 at 14:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Baum mit Augen, Community♦ Nov 12 '18 at 14:22
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What doespython --version
show from cmd?
– Mad Physicist
Nov 12 '18 at 14:07
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
@MadPhysicist It saysPython 2.7.15
- I guess my path is wrong?
– Bassie
Nov 12 '18 at 14:09
add a comment |
What doespython --version
show from cmd?
– Mad Physicist
Nov 12 '18 at 14:07
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
@MadPhysicist It saysPython 2.7.15
- I guess my path is wrong?
– Bassie
Nov 12 '18 at 14:09
What does
python --version
show from cmd?– Mad Physicist
Nov 12 '18 at 14:07
What does
python --version
show from cmd?– Mad Physicist
Nov 12 '18 at 14:07
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
@MadPhysicist It says
Python 2.7.15
- I guess my path is wrong?– Bassie
Nov 12 '18 at 14:09
@MadPhysicist It says
Python 2.7.15
- I guess my path is wrong?– Bassie
Nov 12 '18 at 14:09
add a comment |
2 Answers
2
active
oldest
votes
You should install it with python 3.6.
try these
pip3.6 install serial
or
python3.6 -m pip install serial
1
pip3
may also work.
– Blacksilver
Nov 12 '18 at 14:16
add a comment |
You probably have more then one Python shell on your PC.
According to your comment , you installed the module on python 2.7.15 and try to work with it in python 3.6.
- Install it on the same shell you will use it (using pip command is most convenient)
- Configure your IDE to use the correct python shell
Please note that if you use pip from the command line , without entering the python shell , you will not be able to know , on which shell it was installed.
In case you have multiple python shell , you need to enter the python shell and then use pip command.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should install it with python 3.6.
try these
pip3.6 install serial
or
python3.6 -m pip install serial
1
pip3
may also work.
– Blacksilver
Nov 12 '18 at 14:16
add a comment |
You should install it with python 3.6.
try these
pip3.6 install serial
or
python3.6 -m pip install serial
1
pip3
may also work.
– Blacksilver
Nov 12 '18 at 14:16
add a comment |
You should install it with python 3.6.
try these
pip3.6 install serial
or
python3.6 -m pip install serial
You should install it with python 3.6.
try these
pip3.6 install serial
or
python3.6 -m pip install serial
answered Nov 12 '18 at 14:08
Mehrdad PedramfarMehrdad Pedramfar
4,96211237
4,96211237
1
pip3
may also work.
– Blacksilver
Nov 12 '18 at 14:16
add a comment |
1
pip3
may also work.
– Blacksilver
Nov 12 '18 at 14:16
1
1
pip3
may also work.– Blacksilver
Nov 12 '18 at 14:16
pip3
may also work.– Blacksilver
Nov 12 '18 at 14:16
add a comment |
You probably have more then one Python shell on your PC.
According to your comment , you installed the module on python 2.7.15 and try to work with it in python 3.6.
- Install it on the same shell you will use it (using pip command is most convenient)
- Configure your IDE to use the correct python shell
Please note that if you use pip from the command line , without entering the python shell , you will not be able to know , on which shell it was installed.
In case you have multiple python shell , you need to enter the python shell and then use pip command.
add a comment |
You probably have more then one Python shell on your PC.
According to your comment , you installed the module on python 2.7.15 and try to work with it in python 3.6.
- Install it on the same shell you will use it (using pip command is most convenient)
- Configure your IDE to use the correct python shell
Please note that if you use pip from the command line , without entering the python shell , you will not be able to know , on which shell it was installed.
In case you have multiple python shell , you need to enter the python shell and then use pip command.
add a comment |
You probably have more then one Python shell on your PC.
According to your comment , you installed the module on python 2.7.15 and try to work with it in python 3.6.
- Install it on the same shell you will use it (using pip command is most convenient)
- Configure your IDE to use the correct python shell
Please note that if you use pip from the command line , without entering the python shell , you will not be able to know , on which shell it was installed.
In case you have multiple python shell , you need to enter the python shell and then use pip command.
You probably have more then one Python shell on your PC.
According to your comment , you installed the module on python 2.7.15 and try to work with it in python 3.6.
- Install it on the same shell you will use it (using pip command is most convenient)
- Configure your IDE to use the correct python shell
Please note that if you use pip from the command line , without entering the python shell , you will not be able to know , on which shell it was installed.
In case you have multiple python shell , you need to enter the python shell and then use pip command.
answered Nov 12 '18 at 14:20
Gil.IGil.I
624921
624921
add a comment |
add a comment |
What does
python --version
show from cmd?– Mad Physicist
Nov 12 '18 at 14:07
See if this helps you: stackoverflow.com/questions/33267070/no-module-named-serial. Not saying it is duplicate just if this solves your purpose
– Rahul Agarwal
Nov 12 '18 at 14:08
@MadPhysicist It says
Python 2.7.15
- I guess my path is wrong?– Bassie
Nov 12 '18 at 14:09