Error When Connecting to MongoDB on Atlas Using Python3 and MongoAlchemy - python-3.x

I am connecting to a cluster set up on MongoDB Atlas using the connection string given on the site.
I am running python3 and then run the import db from my module.
I get the error "pymongo.errors.InvalidURI: Invalid URI scheme: mongodb+srv"
My code looks like:
app.config["MONGOALCHEMY_DATABASE"] = "<CLUSTER NAME>"
app.config["MONGOALCHEMY_CONNECTION_STRING"] = "mongodb+srv://<REST OF URL GIVEN"
My install list looks as:
Package Version
bcrypt 3.1.7
cffi 1.12.3
Click 7.0
Flask 1.1.0
Flask-Bcrypt 0.7.1
Flask-Login 0.4.1
Flask-MongoAlchemy 0.7.2
Flask-PyMongo 0.5.2
Flask-SQLAlchemy 2.4.0
Flask-WTF 0.14.2
itsdangerous 1.1.0
Jinja2 2.10.1
MarkupSafe 1.1.1
MongoAlchemy 0.19
pip 19.1.1
pkg-resources 0.0.0
pycparser 2.19
pymongo 2.8.1
setuptools 41.0.1
six 1.12.0
SQLAlchemy 1.3.5
Werkzeug 0.15.4
wheel 0.33.4
WTForms 2.2.1

It seems to work now since I installed an earlier version with pip3 install Flask-MongoAlchemy==0.7.1
It now seems to connect, but I am running into other problems now.

Related

Python3 flask ModuleNotFoundError: No module named 'blurhash' error

I am new to Python. Recently, I am using Python 3.9.12 and Flask 2.1.2 to work on a project. When I run flask run, it throw me an error: ModuleNotFoundError: No module named 'blurhash'.However I have installed blurhash by pip3 install blurhash. When I do pip3 list, it shows:
Package Version
------------------ ---------
blurhash 1.1.4
certifi 2021.10.8
cffi 1.15.0
click 8.1.3
distlib 0.3.4
filelock 3.6.0
Flask 2.1.2
importlib-metadata 4.11.3
itsdangerous 2.1.2
Jinja2 3.1.2
MarkupSafe 2.1.1
Pillow 9.1.0
pip 22.0.4
pipenv 2022.5.2
platformdirs 2.5.2
pycparser 2.21
setuptools 60.10.0
six 1.16.0
virtualenv 20.14.1
virtualenv-clone 0.5.7
Werkzeug 2.1.2
wheel 0.37.1
zipp 3.8.0
Any ideas about this? Many Thanks!

Docker-compose and extended Dokerfile: External Providers not found

I've deployed apache airflow using docker-compose using an extended image to include requirements. I can see in the airflow UI that the snowflake providers package was installed (apache-airflow-providers-snowflake), but for some reason, I'm getting a DAG import error:
from airflow.providers.snowflake.hooks.snowflake import SnowflakeHook
ModuleNotFoundError: No module named 'airflow.providers.snowflake'
I've logged into the docker webserver, used the airflow user, and successfully imported this package.
Dockerfile:
FROM apache/airflow:2.3.0-python3.9
USER root
COPY requirements.txt .
RUN apt-get update && \
apt-get install -y apt-utils
USER airflow
RUN pip3 install --no-cache-dir -r requirements.txt
see below:
[philip#ip-10-5-51-10 airflow_2]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0516db2653a0 airflow_2_airflow-webserver "/usr/bin/dumb-init …" About an hour ago Up 52 minutes (healthy) 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp airflow_2_airflow-webserver_1
36142cc09a6b airflow_2_airflow-scheduler "/usr/bin/dumb-init …" About an hour ago Up 52 minutes (healthy) 8080/tcp airflow_2_airflow-scheduler_1
c090e86e9279 airflow_2_airflow-triggerer "/usr/bin/dumb-init …" About an hour ago Up 52 minutes (healthy) 8080/tcp airflow_2_airflow-triggerer_1
ade8996d759f airflow_2_airflow-worker "/usr/bin/dumb-init …" About an hour ago Up 52 minutes (healthy) 8080/tcp airflow_2_airflow-worker_1
8915e4fb4ffe airflow_2_flower "/usr/bin/dumb-init …" About an hour ago Up 52 minutes (healthy) 0.0.0.0:5555->5555/tcp, :::5555->5555/tcp, 8080/tcp airflow_2_flower_1
353f2fa5552f postgres:13 "docker-entrypoint.s…" 4 hours ago Up 52 minutes (healthy) 5432/tcp airflow_2_postgres_1
1bafa42ece77 redis:latest "docker-entrypoint.s…" 4 hours ago Up 52 minutes (healthy) 6379/tcp airflow_2_redis_1
408ad15538ce denny/monitor-docker-slack:latest "/monitor-docker-sla…" 12 months ago Up 3 days monitor-docker-slack
[philip#ip-10-5-51-10 airflow_2]$ docker exec -u 0 -it airflow_2_airflow-webserver_1 bash
root#0516db2653a0:/opt/airflow# su - airflow
airflow#0516db2653a0:~$ pip list
Package Version
---------------------------------------- ------------
adal 1.2.7
alembic 1.7.7
amqp 5.1.1
anyio 3.5.0
apache-airflow 2.3.0
apache-airflow-providers-amazon 3.3.0
apache-airflow-providers-celery 2.1.4
apache-airflow-providers-cncf-kubernetes 4.0.1
apache-airflow-providers-docker 2.6.0
apache-airflow-providers-elasticsearch 3.0.3
apache-airflow-providers-ftp 2.1.2
apache-airflow-providers-google 6.8.0
apache-airflow-providers-grpc 2.0.4
apache-airflow-providers-hashicorp 2.2.0
apache-airflow-providers-http 2.1.2
apache-airflow-providers-imap 2.2.3
apache-airflow-providers-microsoft-azure 3.8.0
apache-airflow-providers-mysql 2.2.3
apache-airflow-providers-odbc 2.0.4
apache-airflow-providers-postgres 4.1.0
apache-airflow-providers-redis 2.0.4
apache-airflow-providers-sendgrid 2.0.4
apache-airflow-providers-sftp 2.6.0
apache-airflow-providers-slack 4.2.3
apache-airflow-providers-snowflake 2.6.0
apache-airflow-providers-sqlite 2.1.3
apache-airflow-providers-ssh 2.4.3
apispec 3.3.2
argcomplete 1.12.2
asn1crypto 1.4.0
attrs 20.3.0
Authlib 1.0.1
azure-batch 12.0.0
azure-common 1.1.28
azure-core 1.23.1
azure-cosmos 4.2.0
azure-datalake-store 0.0.52
azure-identity 1.9.0
azure-keyvault-secrets 4.4.0
azure-kusto-data 0.0.45
azure-mgmt-containerinstance 1.5.0
azure-mgmt-core 1.3.0
azure-mgmt-datafactory 1.1.0
azure-mgmt-datalake-nspkg 3.0.1
azure-mgmt-datalake-store 0.5.0
azure-mgmt-nspkg 3.0.2
azure-mgmt-resource 21.0.0
azure-nspkg 3.0.2
azure-storage-blob 12.8.1
azure-storage-common 2.1.0
azure-storage-file 2.1.0
Babel 2.9.0
bcrypt 3.2.0
beautifulsoup4 4.11.1
billiard 3.6.4.0
blinker 1.4
boto3 1.16.59
botocore 1.19.59
cached-property 1.5.2
cachelib 0.6.0
cachetools 4.2.2
catboost 0.25.1
cattrs 1.10.0
celery 5.2.6
certifi 2020.12.5
cffi 1.14.4
chardet 3.0.4
charset-normalizer 2.0.12
click 8.1.2
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
clickclick 20.10.2
cloudpickle 2.0.0
colorama 0.4.4
colorlog 4.0.2
commonmark 0.9.1
configparser 3.5.3
connexion 2.13.0
cron-descriptor 1.2.24
croniter 0.3.37
cryptography 3.3.1
cycler 0.11.0
dask 2022.2.0
db-dtypes 1.0.0
decorator 5.1.1
defusedxml 0.6.0
Deprecated 1.2.13
dill 0.3.3
distlib 0.3.4
distributed 2022.2.0
dnspython 2.1.0
docker 5.0.3
docutils 0.16
elasticsearch 7.13.4
elasticsearch-dbapi 0.2.9
elasticsearch-dsl 7.4.0
email-validator 1.1.2
eventlet 0.33.0
filelock 3.6.0
Flask 1.1.2
Flask-Admin 1.5.4
Flask-AppBuilder 3.4.5
Flask-Babel 1.0.0
Flask-Caching 1.10.1
Flask-JWT-Extended 3.25.0
Flask-Login 0.4.1
Flask-OpenID 1.2.5
Flask-Session 0.4.0
Flask-SQLAlchemy 2.4.4
flask-swagger 0.2.13
Flask-WTF 0.14.3
flower 1.0.0
fonttools 4.33.3
fsspec 2022.3.0
funcsigs 1.0.2
future 0.16.0
gevent 21.12.0
google-ads 14.0.0
google-api-core 2.7.2
google-api-python-client 1.12.11
google-auth 2.6.6
google-auth-httplib2 0.1.0
google-auth-oauthlib 0.5.1
google-cloud-aiplatform 1.12.1
google-cloud-appengine-logging 1.1.1
google-cloud-audit-log 0.2.0
google-cloud-automl 2.7.2
google-cloud-bigquery 2.34.3
google-cloud-bigquery-datatransfer 3.6.1
google-cloud-bigquery-storage 2.13.1
google-cloud-bigtable 1.7.1
google-cloud-build 3.8.1
google-cloud-container 1.0.2
google-cloud-core 2.3.0
google-cloud-datacatalog 3.7.1
google-cloud-dataplex 0.2.1
google-cloud-dataproc 4.0.2
google-cloud-dataproc-metastore 1.5.0
google-cloud-dlp 1.0.1
google-cloud-kms 2.11.1
google-cloud-language 1.3.1
google-cloud-logging 3.0.0
google-cloud-memcache 1.3.1
google-cloud-monitoring 2.9.1
google-cloud-orchestration-airflow 1.3.1
google-cloud-os-login 2.6.1
google-cloud-pubsub 2.12.0
google-cloud-redis 2.8.0
google-cloud-resource-manager 1.4.1
google-cloud-secret-manager 1.0.1
google-cloud-spanner 1.19.2
google-cloud-speech 1.3.3
google-cloud-storage 1.44.0
google-cloud-tasks 2.8.1
google-cloud-texttospeech 1.0.2
google-cloud-translate 1.7.1
google-cloud-videointelligence 1.16.2
google-cloud-vision 1.0.1
google-cloud-workflows 1.6.1
google-crc32c 1.3.0
google-resumable-media 2.3.2
googleapis-common-protos 1.56.0
graphviz 0.16
greenlet 1.1.2
grpc-google-iam-v1 0.12.4
grpcio 1.44.0
grpcio-gcp 0.2.2
grpcio-status 1.44.0
gunicorn 20.1.0
h11 0.12.0
HeapDict 1.0.1
httpcore 0.14.7
httplib2 0.19.1
httpx 0.22.0
humanize 4.0.0
hvac 0.11.2
idna 2.10
importlib-metadata 3.10.1
importlib-resources 5.7.1
inflection 0.5.1
iso8601 0.1.13
isodate 0.6.0
itsdangerous 1.1.0
Jinja2 2.10.3
jmespath 0.10.0
joblib 1.0.0
json-merge-patch 0.2
jsonpath-ng 1.5.3
jsonschema 3.2.0
kiwisolver 1.4.2
kombu 5.2.4
kubernetes 23.3.0
lazy-object-proxy 1.4.3
ldap3 2.9.1
locket 1.0.0
lockfile 0.12.2
looker-sdk 22.4.0
lxml 4.8.0
Mako 1.1.4
Markdown 3.3.4
MarkupSafe 1.1.1
marshmallow 3.15.0
marshmallow-enum 1.5.1
marshmallow-oneofschema 3.0.1
marshmallow-sqlalchemy 0.26.1
matplotlib 3.5.2
msal 1.17.0
msal-extensions 0.3.1
msgpack 1.0.3
msrest 0.6.21
msrestazure 0.6.4
mypy-boto3-rds 1.22.0.post1
mypy-boto3-redshift-data 1.22.0.post1
mysql-connector-python 8.0.29
mysqlclient 2.1.0
natsort 7.1.0
nox 2020.12.31
numpy 1.19.5
oauthlib 3.1.0
openapi-spec-validator 0.2.9
oscrypto 1.2.1
packaging 21.3
pandas 0.25.3
pandas-gbq 0.17.4
paramiko 2.10.4
partd 1.2.0
pathspec 0.9.0
pendulum 2.1.2
Pillow 9.1.0
pip 22.0.4
platformdirs 2.5.2
plotly 5.7.0
pluggy 1.0.0
ply 3.11
portalocker 2.4.0
prison 0.2.1
prometheus-client 0.14.1
prompt-toolkit 3.0.29
proto-plus 1.18.1
protobuf 3.20.1
psutil 5.8.0
psycopg2-binary 2.9.3
py 1.11.0
pyarrow 6.0.1
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.20
pycryptodomex 3.9.9
pydata-google-auth 1.4.0
Pygments 2.7.4
PyJWT 1.7.1
PyNaCl 1.5.0
pyodbc 4.0.32
pyOpenSSL 19.1.0
pyparsing 2.4.7
pyrsistent 0.17.3
pysftp 0.2.9
python-daemon 2.3.0
python-dateutil 2.8.1
python-editor 1.0.4
python-http-client 3.3.7
python-ldap 3.4.0
python-nvd3 0.15.0
python-slugify 6.1.1
python3-openid 3.2.0
pytz 2020.5
pytzdata 2020.1
PyYAML 5.4.1
redis 3.5.3
redshift-connector 2.0.906
requests 2.27.1
requests-oauthlib 1.3.1
rfc3986 1.5.0
rich 12.3.0
rsa 4.8
s3transfer 0.3.4
scikit-learn 0.24.1
scipy 1.7.3
scramp 1.4.1
sendgrid 6.9.7
setproctitle 1.2.1
setuptools 57.5.0
six 1.15.0
sklearn 0.0
slack-sdk 3.15.2
slackclient 1.0.7
sniffio 1.2.0
snowflake-connector-python 2.7.7
snowflake-sqlalchemy 1.3.4
sortedcontainers 2.4.0
soupsieve 2.3.2.post1
SQLAlchemy 1.4.9
sqlalchemy-bigquery 1.4.3
SQLAlchemy-JSONField 1.0.0
sqlalchemy-redshift 0.8.9
SQLAlchemy-Utils 0.38.2
sqlparse 0.4.1
sshtunnel 0.4.0
starkbank-ecdsa 2.0.3
statsd 3.3.0
swagger-ui-bundle 0.0.8
tabulate 0.8.7
tblib 1.7.0
tenacity 8.0.1
termcolor 1.1.0
text-unidecode 1.3
threadpoolctl 3.1.0
thrift 0.13.0
toolz 0.11.2
tornado 6.1
typing_extensions 4.2.0
tzlocal 1.5.1
unicodecsv 0.14.1
uritemplate 3.0.1
urllib3 1.25.11
vine 5.0.0
virtualenv 20.14.1
watchtower 2.0.1
wcwidth 0.2.5
websocket-client 0.59.0
Werkzeug 1.0.1
wheel 0.37.1
wrapt 1.14.0
WTForms 2.3.3
zict 2.1.0
zipp 3.4.0
zope.deprecation 4.4.0
zope.event 4.5.0
zope.interface 5.4.0
HI I think this provider is not installed can you follow some steps to confirm if this is installed
first open cmd and write docker ps
Then copy the cluster id of the webserver which will be like in this picture cluster id will be like starting from 39d11(this will change your cluster id will be different )
after copying the cluster id can you go write this in cmd type
docker exec -it cluster-id /bin/bash
now when you are in the airflow cluster go to the airflow /dag folder and now type pip list and you can see there is no provider install and you have to install it here again thanks

Importing the numpy c-extensions failed in MacOS

Importing the numpy c-extensions failed
I am trying to use numpy in terminal, when i imported it it returned an error.But whe I import numpy in pytharm Python Console,it worked well.I have python 2.7.10 and 3.7.5,python 3.7.5 was used in pytharm. I uninstalled numpy on all versions of python and reinstalled it on python 3.7.5 only, but it returned the same error. I reinstall packages via the command line by entering:
python3 -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose
but it returned the same error too.I guess it's a multi-environment problem.
Tried uninstall and install numpy and setuptools like this:
pip uninstall -y numpy
pip uninstall -y setuptools
pip install setuptools
pip install numpy
but it returned the same error too.
My python3 pip list:
absl-py 0.9.0
aiodns 2.0.0
aiohttp 3.5.4
appnope 0.1.0
astor 0.8.1
async-timeout 3.0.1
attrs 19.1.0
backcall 0.1.0
beautifulsoup4 4.5.3
bleach 3.1.0
browsermob-proxy 0.8.0
bs4 0.0.1
cchardet 2.1.4
certifi 2019.3.9
cffi 1.12.3
chardet 3.0.4
cssselect 1.0.3
cycler 0.10.0
decorator 4.4.1
defusedxml 0.6.0
entrypoints 0.3
fake-useragent 0.1.11
gast 0.3.2
google-pasta 0.1.8
grpcio 1.26.0
h5py 2.10.0
idna 2.6
importlib-metadata 1.3.0
ipykernel 5.1.3
ipython 5.4.1
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.15.2
Jinja2 2.10.3
joblib 0.14.1
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 5.3.4
jupyter-console 5.2.0
jupyter-core 4.6.1
Keras 2.2.4
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
lxml 4.3.3
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.1.2
mistune 0.8.4
more-itertools 8.0.2
mpmath 1.1.0
multidict 4.5.2
nbconvert 5.6.1
nbformat 4.4.0
nose 1.3.7
notebook 6.0.2
ntplib 0.3.3
numpy 1.17.4
opencv-python 4.1.2.30
pandas 0.25.3
pandocfilters 1.4.2
parso 0.5.2
pexpect 4.7.0
pickleshare 0.7.5
Pillow 6.2.1
pip 19.3.1
prometheus-client 0.7.1
prompt-toolkit 1.0.18
protobuf 3.11.2
ptyprocess 0.6.0
pycares 3.0.0
pycparser 2.19
pycrypto 2.6.1
Pygments 2.5.2
PyMySQL 0.9.3
pyparsing 2.4.5
pyquery 1.4.0
pyrsistent 0.15.6
python-dateutil 2.8.1
pytz 2019.3
PyYAML 5.2
pyzmq 18.1.1
qtconsole 4.6.0
redis 3.3.11
requests 2.18.4
scikit-learn 0.22
scipy 1.4.1
selenium 3.11.0
Send2Trash 1.5.0
setuptools 42.0.2
simplegeneric 0.8.1
six 1.13.0
sklearn 0.0
soupsieve 1.9.1
splinter 0.13.0
sympy 1.5
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-estimator 1.14.0
termcolor 1.1.0
terminado 0.8.3
testpath 0.4.4
tornado 6.0.3
traitlets 4.3.3
urllib3 1.22
wcwidth 0.1.7
webencodings 0.5.1
Werkzeug 0.16.0
wheel 0.33.6
widgetsnbextension 3.5.1
wrapcache 1.0.8
wrapt 1.11.1
xvfbwrapper 0.2.9
yarl 1.3.0
zipp 0.6.0
How can I solve this problem?
Reproducing code example:
import numpy
Error message:
Blockquote
Python 3.7.5 (default, Nov 1 2019, 02:16:32) [Clang 11.0.0
(clang-1100.0.33.8)] on darwin Type "help", "copyright", "credits" or
"license" for more information.
import numpy Traceback (most recent call last): File "/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/init.py",
line 17, in
from . import multiarray File "/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/multiarray.py",
line 14, in
from . import overrides File "/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/overrides.py",
line 7, in
from numpy.core._multiarray_umath import ( ImportError: dlopen(/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so,
2): Symbol not found: ___addtf3 Referenced from:
/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib Expected in: /usr/lib/libSystem.B.dylib in
/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 1, in
File
"/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/init.py",
line 142, in
from . import core File "/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/init.py",
line 47, in
raise ImportError(msg) ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
1. Check that you expected to use Python3.7 from "/usr/local/opt/python/bin/python3.7",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.17.4" you're trying to use.
2. If (1) looks fine, you can open a new issue at
https://github.com/numpy/numpy/issues. Please include details on:
- how you installed Python
- how you installed numpy
- your operating system
- whether or not you have multiple versions of Python installed
- if you built from source, your compiler versions and ideally a build log
If you're working with a numpy git repository, try git clean -xdf (removes all files not under version control) and rebuild numpy.
Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.
Original error was:
dlopen(/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so,
2): Symbol not found: ___addtf3 Referenced from:
/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib Expected in: /usr/lib/libSystem.B.dylib in
/Users/chuck/Library/Python/3.7/lib/python/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
I solved this issue like this:
bogon:bin chuck$ brew unlink python3
Unlinking /usr/local/Cellar/python/3.7.5... 0 symlinks removed
bogon:bin chuck$ brew link python3
Linking /usr/local/Cellar/python/3.7.5...
Error: Could not symlink bin/easy_install-3.7
Target /usr/local/bin/easy_install-3.7
already exists. You may want to remove it:
rm '/usr/local/bin/easy_install-3.7'
To force the link and overwrite all conflicting files:
brew link --overwrite python
To list all files that would be deleted:
brew link --overwrite --dry-run python
bogon:bin chuck$ brew link --overwrite python3
Linking /usr/local/Cellar/python/3.7.5... 24 symlinks created

ImportError: cannot import name '_obtain_input_shape' [duplicate]

This question already has answers here:
ImportError: cannot import name '_obtain_input_shape' from keras
(7 answers)
Closed 4 years ago.
When I run
from keras_vggface.vggface import VGGFace
# Based on VGG16 architecture -> old paper(2015)
vggface = VGGFace(model='vgg16') # or VGGFace() as default
# Based on RESNET50 architecture -> new paper(2017)
vggface = VGGFace(model='resnet50')
# Based on SENET50 architecture -> new paper(2017)
vggface = VGGFace(model='senet50')
in instructions.
I got this error
ImportError: cannot import name '_obtain_input_shape'
I follow the instructions in install the keras_vggface. And here is a list info of my packages.
# packages in environment at /Users/lzq/anaconda3/envs/py36_faceRec:
#
# Name Version Build Channel
bleach 1.5.0 <pip>
ca-certificates 2018.03.07 0
certifi 2018.10.15 py36_0
enum34 1.1.6 <pip>
h5py 2.8.0 <pip>
html5lib 0.9999999 <pip>
Keras 2.1.1 <pip>
keras-vggface 0.5 <pip>
libcxx 4.0.1 hcfea43d_1
libcxxabi 4.0.1 hcfea43d_1
libedit 3.1.20170329 hb402a30_2
libffi 3.2.1 h475c297_4
Markdown 3.0.1 <pip>
ncurses 6.1 h0a44026_0
numpy 1.15.4 <pip>
openssl 1.1.1 h1de35cc_0
Pillow 5.3.0 <pip>
pip 18.1 py36_0
protobuf 3.6.1 <pip>
python 3.6.7 haf84260_0
PyYAML 3.13 <pip>
readline 7.0 h1de35cc_5
scipy 1.1.0 <pip>
setuptools 40.5.0 py36_0
six 1.11.0 <pip>
sqlite 3.25.2 ha441bb4_0
tensorflow 1.4.0 <pip>
tensorflow-tensorboard 0.4.0 <pip>
tk 8.6.8 ha441bb4_0
Werkzeug 0.14.1 <pip>
wheel 0.32.2 py36_0
xz 5.2.4 h1de35cc_4
zlib 1.2.11 hf3cbc9b_2
The VGGFace package you're using is configured for an older version of Keras. The easiest solution for you is to edit the keras-vggface/keras_vggface/models.py file inside the vvgface directory and change line 15 from:
from keras.applications.imagenet_utils import _obtain_input_shape
to
from keras_applications.imagenet_utils import _obtain_input_shape
Alternatively you can also just downgrade Keras to 2.2.0 if you find that easier

Pandas Datareader - Module not found after installation

I am trying to install & use Pandas-Datareader, but when after I have installed it, I receive a ModuleNotFoundError when I try and import it.
I am using Jupyter Notebook installed using Anaconda - so use the conda installer to install new packages.
After typing source activate ipykernel_py3 to activate the Python3 kernel environment, I have used conda install -c anaconda pandas-datareader=0.4.0 to install Pandas-Datareader.
If I try conda list, then I get the output below - which shows Pandas_Datareader installed.
But if I try the command ```import pandas_datareader as pdr`` (as found in documentation here), then I get an error message
ModuleNotFoundError: No module named 'pandas_datareader'
(This happens in both the Jupyter notebook and in the Python3 interpreter running in this environment.
Can anybody help?
Many thanks
** Conda List output:**
# packages in environment at /Users/Chris/anaconda3/envs/ipykernel_py3:
#
appnope 0.1.0 py36_0
beautifulsoup4 4.5.3 py36_0
cycler 0.10.0 py36_0
decorator 4.0.11 py36_0
freetype 2.5.5 2
icu 54.1 0
ipykernel 4.6.1 py36_0
ipython 6.0.0 py36_0
ipython_genutils 0.2.0 py36_0
jupyter_client 5.0.1 py36_0
jupyter_core 4.3.0 py36_0
libpng 1.6.27 0
matplotlib 2.0.2 np112py36_0
mkl 2017.0.1 0
numpy 1.12.1 py36_0
openssl 1.0.2k 1
pandas 0.20.1 np112py36_0
pandas-datareader 0.4.0 py36_0 anaconda
path.py 10.3.1 py36_0
pexpect 4.2.1 py36_0
pickleshare 0.7.4 py36_0
pip 9.0.1 py36_1
prompt_toolkit 1.0.14 py36_0
ptyprocess 0.5.1 py36_0
pygments 2.2.0 py36_0
pyparsing 2.1.4 py36_0
pyqt 5.6.0 py36_2
python 3.6.1 0
python-dateutil 2.6.0 py36_0
pytz 2017.2 py36_0
pyzmq 16.0.2 py36_0
qt 5.6.2 2
readline 6.2 2
requests 2.14.2 py36_0 anaconda
requests-file 1.4.1 py36_0 anaconda
requests-ftp 0.3.1 py36_0 anaconda
scipy 0.19.0 np112py36_0
seaborn 0.7.1 py36_0
setuptools 27.2.0 py36_0
simplegeneric 0.8.1 py36_1
sip 4.18 py36_0
six 1.10.0 py36_0
sqlite 3.13.0 0
tk 8.5.18 0
tornado 4.5.1 py36_0
traitlets 4.3.2 py36_0
wcwidth 0.1.7 py36_0
wheel 0.29.0 py36_0
xz 5.2.2 1
zlib 1.2.8 3
Are you running the notebook in the ipykernel_py3 environment?
source activate ipykernel_py3
ipython notebook
Just type
pip install pandas_datareader in your anaconda prompt
and try running it again in jupyter.

Resources