I setup a python 3.6 virtual environment named open_roads and it can be found at:
/home/openDataAdvocate/.virtualenvs/open_roads
I loaded flask, flask_login, flask_sqlalchemy, mysql, numpy==1.16.0, matplotlib
I updated the Web App to point to the virtual environment and reloaded the web app.
in my flask_app.py file, I added this line:
and I'm getting the exact same error
Traceback (most recent call last):
File "/home/openDataAdvocate/pavement/flask_app.py", line 5, in <module>
import pandas as pd
File "/usr/lib/python3.7/site-packages/pandas/__init__.py", line 11, in <module>
__import__(dependency)
File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 17, in <module>
from . import multiarray
File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/usr/lib/python3.7/site-packages/numpy/core/overrides.py", line 47, in <module>
""")
RuntimeError: implement_array_function method already has a docstring
and I get the exact same error:
Traceback (most recent call last):
File "/home/openDataAdvocate/pavement/flask_app.py", line 5, in <module>
import pandas as pd
File "/usr/lib/python3.7/site-packages/pandas/__init__.py", line 11, in <module>
__import__(dependency)
File "/usr/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/usr/lib/python3.7/site-packages/numpy/core/__init__.py", line 17, in <module>
from . import multiarray
File "/usr/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/usr/lib/python3.7/site-packages/numpy/core/overrides.py", line 47, in <module>
""")
RuntimeError: implement_array_function method already has a docstring
I noticed that the interpreter still says python 3.7. Could this be the problem?
Based on this forum post,
https://help.pythonanywhere.com/pages/SaveAndRunPythonVersion/
I tried to add
| #!/home/myusername/.virtualenvs/myvenv/bin/python
|
or
at the top of my file, but it didn't make any differences.
Any other suggestions?
[edit by admin: formatting]