I have problem with export data to pandas from Exasol v.6.0.4. I can connect with Exasol but when I want to transport data to pandas DataFrame then I have error. I'm using library pyexasol. My code is following:
from pyexasol import ExaConnection
con = ExaConnection(dsn=dns, user=user, password=password)
con.execute('OPEN SCHEMA SCHEMATEST1') #to this moment everything works correct
data = con.export_to_pandas('select * from TABLETEST1') # pandas data frame per default
Error:
TypeError: cannot serialize '_io.FileIO' object
What I've done bad? How I can export data from Exasol query to Pandas DataFrame?
My libraries and version of tools:
Exasol 6.0.4
Python 3.6.4
Libraries:
backcall (0.1.0)
bleach (2.1.3)
colorama (0.3.9)
decorator (4.3.0)
entrypoints (0.2.3)
html5lib (1.0.1)
ipykernel (4.8.2)
ipython (6.4.0)
ipython-genutils (0.2.0)
ipywidgets (7.2.1)
jedi (0.12.0)
Jinja2 (2.10)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
MarkupSafe (1.0)
mistune (0.8.3)
nbconvert (5.3.1)
nbformat (4.4.0)
notebook (5.5.0)
numpy (1.14.3)
pandas (0.23.0)
pandocfilters (1.4.2)
parso (0.2.1)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.15)
pyasn1 (0.4.2)
pyexasol (0.3.17)
Pygments (2.2.0)
pyodbc (4.0.23)
python-dateutil (2.7.3)
pytz (2018.4)
pywinpty (0.5.1)
pyzmq (17.0.0)
qtconsole (4.3.1)
rsa (3.4.2)
scikit-learn (0.19.1)
scipy (1.1.0)
Send2Trash (1.5.0)
setuptools (28.8.0)
simplegeneric (0.8.1)
six (1.11.0)
sklearn (0.0)
terminado (0.8.1)
testpath (0.3.1)
tornado (5.0.2)
traitlets (4.3.2)
wcwidth (0.1.7)
webencodings (0.5.1)
websocket-client (0.47.0)
widgetsnbextension (3.2.1)
Please help! :)
PyEXASOL creator is here! Your code is correct.
This problem was related to Windows "multiprocessing" module implementation lacking fork() and trying to serialize pipe handles created in http_transport.py.
This problem was FIXED starting from version 0.3.23. Please update the package.
pip install --upgrade pyexasol
Related
I have already installed xgboost (using pip on anaconda),and import xgboost as xgb is fine.However when I am using from xgboost import XGBClassifier ,there is an error:
ImportError: cannot import name 'XGBClassifier'
information for platform:
1.windows 7
2.(base) C:\Users\george>pip list
DEPRECATION: The default format will switch to columns in the future. You can us
e --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.con
f under the [list] section) to disable this warning.
alabaster (0.7.10)
anaconda-client (1.6.9)
anaconda-navigator (1.7.0)
anaconda-project (0.8.2)
asn1crypto (0.24.0)
astroid (1.6.1)
astropy (2.0.3)
attrs (17.4.0)
Babel (2.5.3)
backports.shutil-get-terminal-size (1.0.0)
beautifulsoup4 (4.6.0)
bitarray (0.8.1)
bkcharts (0.2)
blaze (0.11.3)
bleach (2.1.2)
bokeh (0.12.13)
boto (2.48.0)
boto3 (1.9.42)
botocore (1.12.42)
Bottleneck (1.2.1)
certifi (2018.1.18)
cffi (1.11.4)
chardet (3.0.4)
click (6.7)
cloudpickle (0.5.2)
clyent (1.2.2)
colorama (0.3.9)
comtypes (1.1.4)
conda (4.4.10)
conda-build (3.4.1)
conda-verify (2.0.0)
contextlib2 (0.5.5)
cryptography (2.1.4)
cycler (0.10.0)
Cython (0.27.3)
cytoolz (0.9.0)
dask (0.20.1)
datashape (0.5.4)
decorator (4.2.1)
distributed (1.24.1)
docutils (0.14)
entrypoints (0.2.3)
et-xmlfile (1.0.1)
fastcache (1.0.2)
featuretools (0.4.0)
filelock (2.0.13)
Flask (0.12.2)
Flask-Cors (3.0.3)
future (0.17.1)
gevent (1.2.2)
glob2 (0.6)
greenlet (0.4.12)
h5py (2.7.1)
heapdict (1.0.0)
html5lib (1.0.1)
idna (2.6)
imageio (2.2.0)
imagesize (0.7.1)
ipython (6.2.1)
ipython-genutils (0.2.0)
ipywidgets (7.1.1)
isort (4.2.15)
itsdangerous (0.24)
jdcal (1.3)
jedi (0.11.1)
Jinja2 (2.10)
jmespath (0.9.3)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.2.2)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
jupyterlab (0.31.4)
jupyterlab-launcher (0.10.2)
lazy-object-proxy (1.3.1)
llvmlite (0.21.0)
locket (0.2.0)
lxml (4.1.1)
MarkupSafe (1.0)
matplotlib (2.1.2)
mccabe (0.6.1)
menuinst (1.4.11)
mistune (0.8.3)
mpmath (1.0.0)
msgpack (0.5.6)
msgpack-python (0.5.1)
multipledispatch (0.4.9)
navigator-updater (0.1.0)
nbconvert (5.3.1)
nbformat (4.4.0)
networkx (2.1)
nltk (3.2.5)
nose (1.3.7)
notebook (5.4.0)
numba (0.36.2)
numexpr (2.6.4)
numpy (1.14.0)
numpydoc (0.7.0)
odo (0.5.1)
olefile (0.45.1)
openpyxl (2.4.10)
packaging (16.8)
pandas (0.23.4)
pandocfilters (1.4.2)
parso (0.1.1)
partd (0.3.8)
path.py (10.5)
pathlib2 (2.3.0)
patsy (0.5.0)
pep8 (1.7.1)
pickleshare (0.7.4)
Pillow (5.0.0)
pip (9.0.3)
pkginfo (1.4.1)
plotly (3.4.2)
pluggy (0.6.0)
ply (3.10)
prompt-toolkit (1.0.15)
psutil (5.4.8)
py (1.5.2)
pycodestyle (2.3.1)
pycosat (0.6.3)
pycparser (2.18)
pycrypto (2.6.1)
pycurl (7.43.0.1)
pyflakes (1.6.0)
Pygments (2.2.0)
pylint (1.8.2)
pyodbc (4.0.22)
pyOpenSSL (17.5.0)
pyparsing (2.2.0)
PySocks (1.6.7)
pytest (3.3.2)
python-dateutil (2.6.1)
pytz (2017.3)
PyWavelets (0.5.2)
pywin32 (222)
pywinpty (0.5)
PyYAML (3.12)
pyzmq (17.1.2)
QtAwesome (0.4.4)
qtconsole (4.3.1)
QtPy (1.3.1)
requests (2.18.4)
retrying (1.3.3)
rope (0.10.7)
ruamel-yaml (0.15.35)
s3fs (0.1.6)
s3transfer (0.1.13)
scikit-image (0.13.1)
scikit-learn (0.19.1)
scipy (1.0.0)
seaborn (0.8.1)
Send2Trash (1.4.2)
setuptools (38.4.0)
simplegeneric (0.8.1)
singledispatch (3.4.0.3)
six (1.11.0)
snowballstemmer (1.2.1)
sortedcollections (0.5.3)
sortedcontainers (1.5.9)
Sphinx (1.6.6)
sphinxcontrib-websupport (1.0.1)
spyder (3.2.6)
SQLAlchemy (1.2.1)
statsmodels (0.8.0)
sympy (1.1.1)
tables (3.4.2)
tblib (1.3.2)
terminado (0.8.1)
testpath (0.3.1)
toolz (0.9.0)
tornado (5.1.1)
tqdm (4.28.1)
traitlets (4.3.2)
typing (3.6.2)
unicodecsv (0.14.1)
urllib3 (1.22)
wcwidth (0.1.7)
webencodings (0.5.1)
Werkzeug (0.14.1)
wheel (0.30.0)
widgetsnbextension (3.1.0)
win-inet-pton (1.0.1)
win-unicode-console (0.5)
wincertstore (0.2)
wrapt (1.10.11)
xgboost (0.81)
xlrd (1.1.0)
XlsxWriter (1.0.2)
xlwings (0.11.5)
xlwt (1.3.0)
zict (0.1.3)
Anyone has any ideas how to fix this?I have read some information which recommend to update xcode(it supposed to be used on Mac) and some recommed alter the name of xgboost.py to another(no sight of this file)
Anyone knows please kindly give some advice.
I am trying to configure Superset to read data from my Phoenix DB. I have added the SQLAlchemy libs per the instructions but when I attempt to "Add Database" I get the following exception:
The error message returned was:
No module named 'base'
I don't see any messages in the superset.log so I'm at a loss on how to troubleshoot. Here's the list of python modules in the venv
alembic (0.9.6)
amqp (1.4.9)
anyjson (0.3.3)
Babel (2.5.1)
billiard (3.3.0.23)
celery (3.1.23)
cffi (1.11.2)
click (6.7)
colorama (0.3.9)
cryptography (1.5.3)
defusedxml (0.5.0)
Flask (0.12.2)
Flask-AppBuilder (1.8.1)
Flask-Babel (0.11.2)
Flask-Cache (0.13.1)
Flask-Login (0.2.11)
Flask-Migrate (1.5.1)
Flask-OpenID (1.2.5)
Flask-Script (2.0.5)
Flask-SQLAlchemy (2.0)
Flask-Testing (0.5.0)
Flask-WTF (0.14.2)
future (0.16.0)
gunicorn (19.6.0)
humanize (0.5.1)
idna (2.6)
itsdangerous (0.24)
JayDeBeApi (1.1.1)
Jinja2 (2.10)
JPype1 (0.6.2)
kerberos (1.2.5)
kombu (3.0.37)
Mako (1.0.7)
Markdown (2.6.6)
MarkupSafe (1.0)
numpy (1.14.0rc1)
pandas (0.21.1)
parsedatetime (2.0)
phoenixdb (0.7)
pip (9.0.1)
protobuf (3.5.2)
pyasn1 (0.4.2)
pycparser (2.18)
pydruid (0.3.0)
PyGreSQL (5.0.3)
PyHive (0.5.0)
PyMySQL (0.7.9)
python-dateutil (2.5.3)
python-editor (1.0.3)
python3-openid (3.1.0)
pytz (2017.3)
requests (2.10.0)
sasl (0.2.1)
setuptools (38.5.2)
simplejson (3.8.2)
six (1.11.0)
SQLAlchemy (1.2.5)
sqlalchemy-phoenix (0.3.0)
SQLAlchemy-Utils (0.32.7)
sqlparse (0.1.19)
superset (0.15.0)
thrift (0.10.0)
thrift-sasl (0.3.0)
urllib-kerberos (0.2.0)
Werkzeug (0.11.10)
WTForms (2.1)
I know that pip install or pip freeze can give out the list of python modules installed. Is there a way by which I could change the way I get the output?
For example: pip freeze gives me:
Landscape-Client==14.12
PAM==0.4.2
Twisted-Core==13.2.0
apt-xapian-index==0.45
argparse==1.2.1
Is there a way that I could change this to display:
Landscape-Client-14.12
PAM-0.4.2
Twisted-Core-13.2.0
apt-xapian-index-0.45
argparse-1.2.1
Also, is there a way to get the list of all python components - both from pip & pip3 or do I have to run the command individually?
The way I am looking at it is to see if we can somehow control the output that pip or pip3 gives us.
pip list outputs like the following
adium-theme-ubuntu (0.3.4)
appdirs (1.4.0)
argh (0.26.2)
args (0.1.0)
Babel (2.3.4)
BeautifulSoup (3.2.1)
cffi (1.9.1)
click (6.7)
clint (0.5.1)
colorama (0.3.7)
compass-stylesheets (1.0.2)
cryptography (1.7.2)
Cython (0.23)
decorator (4.0.11)
Django (1.10.5)
django-request (1.5.1)
djangorestframework (3.5.4)
docutils (0.13.1)
enum34 (1.1.6)
future (0.16.0)
get (0.0.0)
gitdb (0.6.4)
gitdb2 (2.0.0)
GitPython (2.1.1)
gyp (0.1)
httplib2 (0.10.3)
idna (2.2)
image (1.5.5)
influxdb (4.0.0)
ipaddress (1.0.18)
jedi (0.10.0)
Kivy (1.9.1)
Kivy-Garden (0.1.4)
Markdown (2.6.8)
monkeylearn (0.3.6)
networkx (1.11)
numpy (1.12.0)
olefile (0.44)
packaging (16.8)
pandas (0.19.2)
pathlib (1.0.1)
pathtools (0.1.2)
pefile (2016.3.28)
Pillow (4.0.0)
pip (9.0.1)
pkginfo (1.4.1)
post (0.0.0)
public (0.0.0)
pyasn1 (0.2.2)
pycparser (2.17)
pycrypto (2.6.1)
pycryptodome (3.4.5)
pyglet (1.2.4)
Pygments (2.2.0)
pygobject (3.22.0)
pyOpenSSL (16.2.0)
pyparsing (2.1.10)
PyPDF2 (1.26.0)
pyScss (1.3.5)
pystache (0.5.4)
Pyste (0.9.10)
python-dateutil (2.6.0)
pytz (2016.10)
pyxdg (0.25)
PyYAML (3.12)
query-string (0.0.0)
request (0.0.0)
requests (2.13.0)
requests-toolbelt (0.7.1)
rsa (3.4.2)
setupfiles (0.0.0)
setuptools (34.2.0)
simplejson (3.10.0)
six (1.10.0)
smmap (0.9.0)
smmap2 (2.0.1)
swapper (1.0.0)
twine (1.8.1)
ubuntuone-client-data (14.4)
unity-lens-photos (1.0)
urllib3 (1.21.1)
virtualenv (15.1.0)
watchdog (0.8.3)
wheel (0.29.0)
I've never tried to supply additional commands to "list" but as it was pointed out you could write a script.
I'm not quite sure what you mean by "All python components" as that's very broad.
The "pip freeze" commands outputs installed packages in requirements format.
pip list just outputs all locally installed packages along with their version in a somewhat cleaner format. Could you perhaps give me more information as to what you meant by "all python components" in case this answer doesn't help?
I am using virtualenvwrapper to create/manage my virtual environments. Upon running pip freeze on my environments, I was surprised to find that several tens of Python modules and packages (installed before I knew about virtualenv/wrapper), are being installed in my new environment.
This is NOT the expected behaviour; I want to have a clean environment, where only the packages I have installed in that environment, are available.
The command I'm using is:
mkvirtualenv --no-site-packages mynewenv
When I run pip freeze in that new environment, I get the following long list (I was expecting nothing to be installed in the new environment):
apturl (0.5.2)
beautifulsoup4 (4.4.1)
bleach (1.5.0)
blinker (1.3)
Brlapi (0.6.4)
chardet (2.3.0)
checkbox-support (0.22)
command-not-found (0.3)
coverage (3.7.1)
cryptography (1.2.3)
Cython (0.25.2)
decorator (4.0.10)
defer (1.0.6)
Django (1.10.5)
djangorestframework (3.5.3)
entrypoints (0.2.2)
enum34 (1.1.6)
feedparser (5.1.3)
guacamole (0.9.2)
html5lib (0.999)
httplib2 (0.9.1)
idna (2.0)
ipykernel (4.5.2)
ipython (5.1.0)
ipython-genutils (0.1.0)
ipywidgets (5.2.2)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.4.0)
jupyter-console (5.0.0)
jupyter-core (4.2.1)
language-selector (0.1)
louis (2.6.4)
lxml (3.5.0)
lz4 (0.8.2)
Mako (1.0.3)
MarkupSafe (0.23)
mistune (0.7.3)
mockextras (1.0.2)
nbconvert (5.0.0)
nbformat (4.2.0)
notebook (4.3.1)
numpy (1.11.3)
oauthlib (1.0.3)
onboard (1.2.0)
padme (1.1.1)
pandas (0.19.2)
pandocfilters (1.4.1)
pbr (1.10.0)
pexpect (4.0.1)
pickleshare (0.7.4)
Pillow (3.1.2)
pip (9.0.1)
plainbox (0.25)
prompt-toolkit (1.0.9)
ptyprocess (0.5)
pyasn1 (0.1.9)
pycups (1.9.73)
pycurl (7.43.0)
Pygments (2.1)
pygobject (3.20.0)
PyJWT (1.3.0)
pymongo (3.4.0)
pyparsing (2.0.3)
pysmbc (1.0.15.5)
python-apt (1.1.0b1)
python-dateutil (2.6.0)
python-debian (0.1.27)
python-systemd (231)
pytz (2016.10)
pyxdg (0.25)
pyzmq (16.0.2)
qtconsole (4.2.1)
reportlab (3.3.0)
requests (2.9.1)
sessioninstaller (0.0.0)
setuptools (23.0.0)
simplegeneric (0.8.1)
six (1.10.0)
stevedore (1.15.0)
system-service (0.3)
terminado (0.6)
testpath (0.3)
tornado (4.4.2)
traitlets (4.3.1)
tzlocal (1.3)
ubuntu-drivers-common (0.0.0)
ufw (0.35)
unattended-upgrades (0.1)
unity-scope-calculator (0.1)
unity-scope-chromiumbookmarks (0.1)
unity-scope-colourlovers (0.1)
unity-scope-devhelp (0.1)
unity-scope-firefoxbookmarks (0.1)
unity-scope-gdrive (0.7)
unity-scope-manpages (0.1)
unity-scope-openclipart (0.1)
unity-scope-texdoc (0.1)
unity-scope-tomboy (0.1)
unity-scope-virtualbox (0.1)
unity-scope-yelp (0.1)
unity-scope-zotero (0.1)
urllib3 (1.13.1)
usb-creator (0.3.0)
virtualenv (15.1.0)
virtualenv-clone (0.2.6)
wcwidth (0.1.7)
wheel (0.29.0)
widgetsnbextension (1.2.6)
xdiagnose (3.8.4)
xkit (0.0.0)
XlsxWriter (0.7.3)
[[Miscellaneous Information]]
virtualenv --version 15.1.0
virtualenvwrapper==4.7.2
OS: Ubuntu 16.0.4
Python: 2.7 & 3.5
which pip : /usr/local/bin/pip
which pip3: /usr/local/bin/pip3
What am I doing wrong?
Did you activate the virtualenv? It's done by "sourcing" the active script:
source <env>/bin/activate
Other problems could be long path names or spaces in the path. What does pwd give in the you virtualenv directory?
Hi I am trying to install pyopenssl so i can use scrapy. When i run the installation i get this error with pip. I also get the same error when trying to install scrapy...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/hy/76g5m82s4nx4b8f4m1tzdd9h0000gn/T/pip_build_joegavin/cryptography
Storing debug log for failure in /Users/joegavin/.pip/pip.log
here is my pip list incase i'm missing something
apptools (4.2.1)
argcomplete (0.6.7)
astropy (0.3)
atom (0.3.7)
backports.ssl-match-hostname (3.4.0.2)
beautifulsoup4 (4.3.1)
binstar (0.4.4)
biopython (1.63)
bitarray (0.8.1)
blaze (0.4.2)
blz (0.6.1)
bokeh (0.4.1)
boto (2.25.0)
casuarius (1.1)
cdecimal (2.3)
chaco (4.4.1)
colorama (0.2.7)
conda (3.4.2)
conda-build (1.3.1)
configobj (4.7.2)
cubes (0.10.2)
Cython (0.20.1)
DataShape (0.1.1)
distribute (0.7.3)
docutils (0.11)
enable (4.3.0)
enaml (0.9.1)
envisage (4.4.0)
Flask (0.10.1)
future (0.11.2)
gevent (1.0)
gevent-websocket (0.9.2)
gevent-zeromq (0.2.2)
greenlet (0.4.2)
grin (1.2.1)
h5py (2.2.1)
ipython (2.0.0)
itsdangerous (0.23)
jdcal (1.0)
Jinja2 (2.7.2)
keyring (3.3)
kiwisolver (0.1.2)
llvmpy (0.12.3)
lxml (3.3.5)
MarkupSafe (0.18)
matplotlib (1.3.1)
mayavi (4.3.1)
MDP (3.3)
mock (1.0.1)
netCDF4 (1.0.8)
networkx (1.8.1)
nltk (2.0.4)
nose (1.3.0)
numba (0.12.1)
numexpr (2.3.1)
numpy (1.8.0)
openpyxl (2.0.2)
pandas (0.13.1)
patsy (0.2.1)
pep8 (1.4.6)
PIL (1.1.7)
pip (1.5.6)
ply (3.4)
psutil (1.2.1)
py (1.4.20)
PyAudio (0.2.7)
pycosat (0.6.0)
pycparser (2.10)
pycrypto (2.6.1)
pycurl (7.19.0)
PyExcelerate (0.6.1)
pyface (4.4.0)
pyflakes (0.7.3)
Pygments (1.6)
pyinstall (0.1.4)
PyInstaller (2.1)
pykit (0.2.0)
pyparsing (2.0.1)
PySAL (1.6.0)
pysam (0.6)
pytest (2.5.2)
python-dateutil (1.5)
pytz (2013b)
PyYAML (3.11)
pyzmq (2.2.0.1)
redis (2.9.1)
requests (2.2.1)
rope (0.9.4)
scikit-image (0.9.3)
scikit-learn (0.14.1)
scipy (0.13.3)
setuptools (5.1)
six (1.5.2)
Sphinx (1.2.1)
spyder (2.2.5)
SQLAlchemy (0.9.2)
statsmodels (0.5.0)
sympy (0.7.4.1)
tables (3.1.0)
tornado (3.2)
traits (4.4.0)
traitsui (4.4.0)
ujson (1.33)
virtualenv (1.11.5)
VTK (5.10.1)
Werkzeug (0.9.4)
wsgiref (0.1.2)
xlrd (0.9.2)
XlsxWriter (0.5.2)
xlwt (0.7.5)
I've tried updating setup tools, reinstalling pip. I'm on OSX can anybody help? Thanks
UPDATE : Pastebin for pip.log : http://pastebin.com/MTNrR0n5
Error code 1 sometimes occurs due to lack of permissions. If you have an admin account, try prefacing your command with sudo.
Perhaps your Python lacks openssl support?
You can find out:
python
>>> import socket
>>> hasattr(socket, 'ssl')
True
If socket doesn't have the ssl attribute, you don't have the needed capabilities.
AFAIK, openssl support must be selected for compilation of the Python interpreter and cannot be installed afterwards.