ImportError: No module named 'flask_sqlalchemy' w/ 2 Versions of Python Installed
Tried running a file with the following imports:
from flask_sqlalchemy import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Received the following error:
ImportError: No module named 'flask_sqlalchemy'
SQLAlchemy is installed. Still, I tried to reinstall into the directory in which it will be used. I got this:
The directory '/Users/_/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/_/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Flask-SQLAlchemy in /Library/Python/2.7/site-packages (2.3.2)
Requirement already satisfied: Flask>=0.10 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.0.2)
Requirement already satisfied: SQLAlchemy>=0.8.0 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.2.10)
Requirement already satisfied: Jinja2>=2.10 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (2.10)
Requirement already satisfied: itsdangerous>=0.24 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.24)
Requirement already satisfied: Werkzeug>=0.14 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.14.1)
Requirement already satisfied: click>=5.1 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (6.7)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.10->Flask>=0.10->Flask-SQLAlchemy) (1.0)
The bit about me not owning the directory is incorrect. I'm the only one on this machine. I own everything.
Anyway, I go back to rerun the file and get the same error message. So, it's installed, but not installed or, at the very least, not available to me.
One error message I saw when I commented out one of the import statements read as follows:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py
I have no clue how to fix this and get SQLAlchemy up and running. I've burned over 1.5 hours on it. The last error listed suggests having 2 versions of python may have something to do with it.
Your thoughts on a remedy would be appreciated.
python sqlalchemy flask-sqlalchemy
|
show 14 more comments
Tried running a file with the following imports:
from flask_sqlalchemy import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Received the following error:
ImportError: No module named 'flask_sqlalchemy'
SQLAlchemy is installed. Still, I tried to reinstall into the directory in which it will be used. I got this:
The directory '/Users/_/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/_/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Flask-SQLAlchemy in /Library/Python/2.7/site-packages (2.3.2)
Requirement already satisfied: Flask>=0.10 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.0.2)
Requirement already satisfied: SQLAlchemy>=0.8.0 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.2.10)
Requirement already satisfied: Jinja2>=2.10 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (2.10)
Requirement already satisfied: itsdangerous>=0.24 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.24)
Requirement already satisfied: Werkzeug>=0.14 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.14.1)
Requirement already satisfied: click>=5.1 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (6.7)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.10->Flask>=0.10->Flask-SQLAlchemy) (1.0)
The bit about me not owning the directory is incorrect. I'm the only one on this machine. I own everything.
Anyway, I go back to rerun the file and get the same error message. So, it's installed, but not installed or, at the very least, not available to me.
One error message I saw when I commented out one of the import statements read as follows:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py
I have no clue how to fix this and get SQLAlchemy up and running. I've burned over 1.5 hours on it. The last error listed suggests having 2 versions of python may have something to do with it.
Your thoughts on a remedy would be appreciated.
python sqlalchemy flask-sqlalchemy
1
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
1
Can you show the output ofwhich python
(or show which REPL comes up when doingpython
on your cmd line). And give output ofpip --version
?
– Matt Messersmith
Jul 31 '18 at 19:05
1
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or usepip3
and reinstall your libs
– Matt Messersmith
Jul 31 '18 at 19:07
1
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
1
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21
|
show 14 more comments
Tried running a file with the following imports:
from flask_sqlalchemy import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Received the following error:
ImportError: No module named 'flask_sqlalchemy'
SQLAlchemy is installed. Still, I tried to reinstall into the directory in which it will be used. I got this:
The directory '/Users/_/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/_/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Flask-SQLAlchemy in /Library/Python/2.7/site-packages (2.3.2)
Requirement already satisfied: Flask>=0.10 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.0.2)
Requirement already satisfied: SQLAlchemy>=0.8.0 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.2.10)
Requirement already satisfied: Jinja2>=2.10 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (2.10)
Requirement already satisfied: itsdangerous>=0.24 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.24)
Requirement already satisfied: Werkzeug>=0.14 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.14.1)
Requirement already satisfied: click>=5.1 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (6.7)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.10->Flask>=0.10->Flask-SQLAlchemy) (1.0)
The bit about me not owning the directory is incorrect. I'm the only one on this machine. I own everything.
Anyway, I go back to rerun the file and get the same error message. So, it's installed, but not installed or, at the very least, not available to me.
One error message I saw when I commented out one of the import statements read as follows:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py
I have no clue how to fix this and get SQLAlchemy up and running. I've burned over 1.5 hours on it. The last error listed suggests having 2 versions of python may have something to do with it.
Your thoughts on a remedy would be appreciated.
python sqlalchemy flask-sqlalchemy
Tried running a file with the following imports:
from flask_sqlalchemy import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Received the following error:
ImportError: No module named 'flask_sqlalchemy'
SQLAlchemy is installed. Still, I tried to reinstall into the directory in which it will be used. I got this:
The directory '/Users/_/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/_/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Flask-SQLAlchemy in /Library/Python/2.7/site-packages (2.3.2)
Requirement already satisfied: Flask>=0.10 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.0.2)
Requirement already satisfied: SQLAlchemy>=0.8.0 in /Library/Python/2.7/site-packages (from Flask-SQLAlchemy) (1.2.10)
Requirement already satisfied: Jinja2>=2.10 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (2.10)
Requirement already satisfied: itsdangerous>=0.24 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.24)
Requirement already satisfied: Werkzeug>=0.14 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (0.14.1)
Requirement already satisfied: click>=5.1 in /Library/Python/2.7/site-packages (from Flask>=0.10->Flask-SQLAlchemy) (6.7)
Requirement already satisfied: MarkupSafe>=0.23 in /Library/Python/2.7/site-packages (from Jinja2>=2.10->Flask>=0.10->Flask-SQLAlchemy) (1.0)
The bit about me not owning the directory is incorrect. I'm the only one on this machine. I own everything.
Anyway, I go back to rerun the file and get the same error message. So, it's installed, but not installed or, at the very least, not available to me.
One error message I saw when I commented out one of the import statements read as follows:
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py
I have no clue how to fix this and get SQLAlchemy up and running. I've burned over 1.5 hours on it. The last error listed suggests having 2 versions of python may have something to do with it.
Your thoughts on a remedy would be appreciated.
python sqlalchemy flask-sqlalchemy
python sqlalchemy flask-sqlalchemy
asked Jul 31 '18 at 18:46
RyanRyan
4321515
4321515
1
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
1
Can you show the output ofwhich python
(or show which REPL comes up when doingpython
on your cmd line). And give output ofpip --version
?
– Matt Messersmith
Jul 31 '18 at 19:05
1
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or usepip3
and reinstall your libs
– Matt Messersmith
Jul 31 '18 at 19:07
1
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
1
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21
|
show 14 more comments
1
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
1
Can you show the output ofwhich python
(or show which REPL comes up when doingpython
on your cmd line). And give output ofpip --version
?
– Matt Messersmith
Jul 31 '18 at 19:05
1
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or usepip3
and reinstall your libs
– Matt Messersmith
Jul 31 '18 at 19:07
1
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
1
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21
1
1
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
1
1
Can you show the output of
which python
(or show which REPL comes up when doing python
on your cmd line). And give output of pip --version
?– Matt Messersmith
Jul 31 '18 at 19:05
Can you show the output of
which python
(or show which REPL comes up when doing python
on your cmd line). And give output of pip --version
?– Matt Messersmith
Jul 31 '18 at 19:05
1
1
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or use
pip3
and reinstall your libs– Matt Messersmith
Jul 31 '18 at 19:07
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or use
pip3
and reinstall your libs– Matt Messersmith
Jul 31 '18 at 19:07
1
1
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
1
1
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21
|
show 14 more comments
2 Answers
2
active
oldest
votes
It's quite likely that you might have installed the particular in a virtual environment but then forgot to assign the venv intepreter as your project's intepreter. If you're using pycharm, go to File > Settings > Project Intepreter, and select the correct intepreter for your project from the dropdown list.
The window would also show you all the packages installed on that particular intepreter so you can confirm that you have actually installed SQLAlchemy.
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
add a comment |
I think you have a mismatch between your pip and python versions.
check your pip version pip --version, if it is pip3
you can try this
sudo apt-get install python3-sqlalchemy
this should work.
:~$ python3
import sqlalchemy
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2f51620139%2fimporterror-no-module-named-flask-sqlalchemy-w-2-versions-of-python-installe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It's quite likely that you might have installed the particular in a virtual environment but then forgot to assign the venv intepreter as your project's intepreter. If you're using pycharm, go to File > Settings > Project Intepreter, and select the correct intepreter for your project from the dropdown list.
The window would also show you all the packages installed on that particular intepreter so you can confirm that you have actually installed SQLAlchemy.
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
add a comment |
It's quite likely that you might have installed the particular in a virtual environment but then forgot to assign the venv intepreter as your project's intepreter. If you're using pycharm, go to File > Settings > Project Intepreter, and select the correct intepreter for your project from the dropdown list.
The window would also show you all the packages installed on that particular intepreter so you can confirm that you have actually installed SQLAlchemy.
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
add a comment |
It's quite likely that you might have installed the particular in a virtual environment but then forgot to assign the venv intepreter as your project's intepreter. If you're using pycharm, go to File > Settings > Project Intepreter, and select the correct intepreter for your project from the dropdown list.
The window would also show you all the packages installed on that particular intepreter so you can confirm that you have actually installed SQLAlchemy.
It's quite likely that you might have installed the particular in a virtual environment but then forgot to assign the venv intepreter as your project's intepreter. If you're using pycharm, go to File > Settings > Project Intepreter, and select the correct intepreter for your project from the dropdown list.
The window would also show you all the packages installed on that particular intepreter so you can confirm that you have actually installed SQLAlchemy.
answered Jul 31 '18 at 18:59
Imran SaidImran Said
195
195
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
add a comment |
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
No clue what pycharm is. To the best of my knowledge, don't need it here.
– Ryan
Jul 31 '18 at 19:01
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
Oh, I incorrectly assumed that you were using pycharm as your IDE, my bad.
– Imran Said
Aug 1 '18 at 8:14
add a comment |
I think you have a mismatch between your pip and python versions.
check your pip version pip --version, if it is pip3
you can try this
sudo apt-get install python3-sqlalchemy
this should work.
:~$ python3
import sqlalchemy
add a comment |
I think you have a mismatch between your pip and python versions.
check your pip version pip --version, if it is pip3
you can try this
sudo apt-get install python3-sqlalchemy
this should work.
:~$ python3
import sqlalchemy
add a comment |
I think you have a mismatch between your pip and python versions.
check your pip version pip --version, if it is pip3
you can try this
sudo apt-get install python3-sqlalchemy
this should work.
:~$ python3
import sqlalchemy
I think you have a mismatch between your pip and python versions.
check your pip version pip --version, if it is pip3
you can try this
sudo apt-get install python3-sqlalchemy
this should work.
:~$ python3
import sqlalchemy
answered Nov 19 '18 at 8:59
Jadhav GauravJadhav Gaurav
11
11
add a comment |
add a comment |
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.
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%2f51620139%2fimporterror-no-module-named-flask-sqlalchemy-w-2-versions-of-python-installe%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
1
It's also possible you have a mismatch between your pip and python versions (i.e. you are still pointing to pip for python2, so it thinks flask_sqlalchemy is installed, but then running with python3). Hard to judge without seeing your environment what is going on here
– Matt Messersmith
Jul 31 '18 at 19:04
1
Can you show the output of
which python
(or show which REPL comes up when doingpython
on your cmd line). And give output ofpip --version
?– Matt Messersmith
Jul 31 '18 at 19:05
1
Yes, I suspect you're running python3 with pip for python2.7. So the libs aren't installed correctly for Python3. You can either run with python2, or use
pip3
and reinstall your libs– Matt Messersmith
Jul 31 '18 at 19:07
1
If you can't change which pip you're using, then you need to make sure you're executing with Python2, not Python3. You've installed the libs for Python2 (as far as I can tell).
– Matt Messersmith
Jul 31 '18 at 19:12
1
Wait, not PYTHONPATH, but just your regular PATH for getting Python2 instead of Python3...PYTHONPATH can only be used to point to Python libs (after you are running python), but it won't tell your OS which Python to start
– Matt Messersmith
Jul 31 '18 at 19:21