ModuleNotFoundError when running code, but works in ipython
up vote
0
down vote
favorite
I'm trying to use the BitVector library in python 3.6. When I run ipython and run "from BitVector import BitVector", I get no error and can successfully use BitVector. However, when I try to run my actual code that contains "from BitVector import BitVector", I get the error:
Traceback (most recent call last):
File "testharness.py", line 1, in <module>
from BitVector import BitVector
ModuleNotFoundError: No module named 'BitVector'
I installed BitVector using "pip3 install BitVector"
python python-3.x bitvector
|
show 2 more comments
up vote
0
down vote
favorite
I'm trying to use the BitVector library in python 3.6. When I run ipython and run "from BitVector import BitVector", I get no error and can successfully use BitVector. However, when I try to run my actual code that contains "from BitVector import BitVector", I get the error:
Traceback (most recent call last):
File "testharness.py", line 1, in <module>
from BitVector import BitVector
ModuleNotFoundError: No module named 'BitVector'
I installed BitVector using "pip3 install BitVector"
python python-3.x bitvector
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
1
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to use the BitVector library in python 3.6. When I run ipython and run "from BitVector import BitVector", I get no error and can successfully use BitVector. However, when I try to run my actual code that contains "from BitVector import BitVector", I get the error:
Traceback (most recent call last):
File "testharness.py", line 1, in <module>
from BitVector import BitVector
ModuleNotFoundError: No module named 'BitVector'
I installed BitVector using "pip3 install BitVector"
python python-3.x bitvector
I'm trying to use the BitVector library in python 3.6. When I run ipython and run "from BitVector import BitVector", I get no error and can successfully use BitVector. However, when I try to run my actual code that contains "from BitVector import BitVector", I get the error:
Traceback (most recent call last):
File "testharness.py", line 1, in <module>
from BitVector import BitVector
ModuleNotFoundError: No module named 'BitVector'
I installed BitVector using "pip3 install BitVector"
python python-3.x bitvector
python python-3.x bitvector
edited Nov 11 at 2:18
eyllanesc
69.8k93052
69.8k93052
asked Nov 11 at 0:36
user1045890
946
946
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
1
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52
|
show 2 more comments
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
1
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
1
1
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52
|
show 2 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
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:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f53244795%2fmodulenotfounderror-when-running-code-but-works-in-ipython%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
Did you install the BitVector package in your python3 environment?
– mistiru
Nov 11 at 0:39
@mistiru how do i make sure i did?
– user1045890
Nov 11 at 0:39
1
simply try : pip3 install BitVector, and try again
– mistiru
Nov 11 at 0:40
@mistiru I get: Requirement already satisfied: BitVector in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
– user1045890
Nov 11 at 0:43
How do you "run [your] actual code that contains "from BitVector import BitVector""?
– mistiru
Nov 11 at 0:52