python - How to install psycopg2 for use in HDInsight PySpark Jupyter notebook -
i need "import psycopg2" part of pyspark script.
per documentation:
!pip install psycopg2
but results in syntax error (as ! command does).
i able install in ssh session /usr/bin/anaconda/bin/python, appears jupyter may using different different environment?
i tried forcing
os.environ["pythonpath"]
in notebook no luck, mean cell in notebook:
- import psycopg2 results in error module can't found
- help("modules") not show psycopg2
- help("modules psycopg2") results in following error:
here list of matching modules. enter module name more help. failed write user configuration file. please submit bug report. sqlalchemy.dialects.postgresql.psycopg2 - .. dialect:: postgresql+psycopg2 sqlalchemy.dialects.postgresql.psycopg2cffi - .. dialect:: postgresql+psycopg2cffi
did make typo? text 'pyscopg2' not 'psycopg2'
!pip install psycopg2
for python 3.5 , python 2.7 installed on azure notebooks.
Comments
Post a Comment