I'm trying to use the HDFStore command in Pandas and although I have PyTables installed, when I run the command:
import pandas as pan
filename=('testfile.h5')
store=pan.HDFStore(filename)
I get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\dashamstyr\Anaconda\lib\site-packages\pandas\io\pytables.py", line 390, in __init__
raise ImportError('HDFStore requires PyTables, "{ex}" problem importing'.format(ex=str(ex)))
ImportError: HDFStore requires PyTables, "cannot import name blosc_get_complib_info_" problem importing
And when I run the command:
import tables
I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\dashamstyr\Anaconda\lib\site-packages\tables\__init__.py", line 84, in <module>
from tables.utilsextension import (
ImportError: cannot import name blosc_get_complib_info_
I using the Anaconda Python distribution for windows 7 64-bit. I have the following versions of relevant packages (I think they're all up to date):
Python 2.7.9
PyTables 3.2.0
HDF5 1.8.15.1
Cython 0.22.1
numexpr 2.4.3
Pandas 0.16.2
Related
I am trying to run a Julia script from python. I have Julia 1.6.4 installed (also tried 1.7.3) and installed pip install julia from Pycharm's terminal in the virtual environment. When importing julia and then running julia.install() I get the following error message:
I use Pycharm with a virtual environment with Python 3.9.7 for my project. However, I have also tried different python versions in different virtual environments or by using the base python installed. All give the same error.
Also, ~/.julia/packages/PyCall/*/deps/build.log does not exist for me.
[ Info: Trying to import PyCall...
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\site.py", line 73, in <module>
import os
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 29, in <module>
from _collections_abc import _check_methods
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\_collections_abc.py", line 12, in <module>
GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\<user>\PycharmProjects\<project>\venv\lib\site-packages\julia\tools.py", line 118, in install
raise PyCallInstallError("Installing", output)
julia.tools.PyCallInstallError: Installing PyCall failed.
** Important information from Julia may be printed before Python's Traceback **
Some useful information may also be stored in the build log file
`~/.julia/packages/PyCall/*/deps/build.log`.```
Julia needs to have PyCall installed
PyCall in Julia needs to be configured to use the same Python that you are using to call Julia from
For more information see this post:
I have a high-performant function written in Julia, how can I use it from Python?
I started compiling TensorFlow from source on Ubuntu Linux 16.06 LTS, running the commands from the TensorFlow Linux compilation instructions.
My CUDA and CuDNN setup works, as the pre-compiled TensorFlow nvidia-docker image works.
After using bazel to build the TensorFlow Python wheel, and then installing the wheel with pip, I get the following error message when trying to import TensorFlow:
>>> import tensorflow
Traceback (most recent call last):
File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
ImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/james/workspace/tensorflow/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/james/workspace/tensorflow/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/james/workspace/tensorflow/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
ImportError: No module named 'tensorflow.python.pywrap_tensorflow_internal'
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
This error happens when you are running Python from the TensorFlow source directory after having installed the Python wheel.
A similar error happens when you try importing TensorFlow before installing the Python wheel.
The solution to this problem is to change your working directory to something else, while still remaining in the virtualenv that you installed the Python wheel to.
In centos I did pip install pandas. Everything looked successful.
However when I import pandas I get:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pandas
Not sure how to fix. Also sys.modules is also showing no pandas.
I'm trying to use matplotlib in Python 2.7, but am encountering the following error
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 156, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/cbook.py", line 15, in <module>
File "/usr/local/lib/python2.7/gzip.py", line 9, in <module>
import zlib
ImportError: No module named zlib
I installed python with sudo apt-get install python2.7, and other required packages similarly. I installed zlib from source, with no issues.
I've tried installing mysql-connector python using
pip install mysql-connector-python
and
pip install mysql-connector-python --allow-external mysql-connector-python
I get the following error saying python v3.2 is not supported.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
----------------------------------------
Should i upgrade my python version? or is there a workaround?
There were some important improvement in 2.x compatibility in Python 3.3, so a lot of packages only support 3.3+. mysql-connector-python is one of them. You are unlikely to be able to fix it without a large amount of work. It would be much easier to just install a later version.