Please I really need help with this error i keep getting. I have been find it difficult to make a plot with seaborn. Whenever i tried using the code i import seaborn as it gives me the same error as shown in the image link below. I have tried using conda install all over again but i keep getting the same error. Please what else can I do? Thank you
image
You probably have an older version of the seaborn. Try to reinstall using pip install seaborn --upgrade.
Related
I have installed the PILLOW module in Windows 8.1 for Python 3 using the below command.
pip install pillow
The installation was a success.
Unfortunately when I tried to import the image sub-module within it using the below statement I got an import error.
from PIL import image
Error: ImportError: cannot import name 'image' from 'PIL' (C:\Program Files\Python38\lib\site-packages\PIL_init_.py)
Although the below statement is giving me an error for the 'PIL' .
image = PIL.Image.open("Capture Image.PNG")
Error: Undefined variable: ' PIL'Python(undefined-variable)
I have tried similar posts listed below, but they didn't help me to solve the issue.
Pip install Pillow: "no module named Pillow?"
Pillow installed, but getting "no module named pillow" when importing
Python pillow module not importing properly
Could you please someone explain what I'm missing here?
Regards,
Chiranthaka
#dragon2fly Many thanks for solving the issue. Please refer the below snippet for the complete source code.
from PIL import Image
image = Image.open("Capture_image.png")
print(image.size)
I am attempting to use Tabula to pull table information from a pdf and convert it to a pandas dataframe. I have been following the steps in this tutorial:
https://aegis4048.github.io/parse-pdf-files-while-retaining-structure-with-tabula-py
When I try to load the remote PDF into my jupyter notebook with the following code (taken directly from the tutorial):
import tabula
df2 = tabula.read_pdf("https://github.com/tabulapdf/tabula-java/raw/master/src/test/resources/technology/tabula/arabic.pdf")
I get the error:
AttributeError: 'list' object has no attribute 'read'
I have tried to read in pdfs saved locally to my machine and I get the same error. I believe I have successfully installed Java and configured the environment variable correctly, and I have the most recent version of Tabula.
Link to screenshot from my jupyter notebook:
https://www.dropbox.com/s/y44mfzuclihfdau/S_O_Capture_1.PNG?dl=0
Thanks.
Make sure you installed the right tabula package!
If you ran pip3 install tabula, then you installed an imposter!
Run pip3 uninstall tabula to remove it, then run:
pip3 install tabula-py
to install the correct package.
I am trying to read a file in hdf format. It was working correctly before but now all of a sudden I am getting the error below:
pandas\_libs\writers.pyx in pandas._libs.writers.string_array_replace_from_nan_rep()
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'double'
My code is just as below:
import pandas as pd
data = pd.read_hdf('p1.hdf')
data
I am using Jupyter notebook and on python 3.6. I just cannot understand why I was able to read the file before without any issues and now this error pops up. The different things that I did since the last run was to create a virtual env to run another code and as I experienced this error now, I reinstalled anaconda but I am still getting this error when reading this file :(
You might have installed the newest pandas version. I had the same issue with the pandas-0.23.4, downgrading it to 0.22.0 fixed it for me.
Update the pandas to version 0.24
It was a problem in pandas 0.23 version. But it is sorted out in the latest version of pandas 0.24.1.
Ref: https://github.com/pandas-dev/pandas/issues/24404
you can upgrade by
pip3 install pandas -upgrade
or
conda install pandas
So I trying to install and run from MSFT the cntk, you know, just for fun. Anyway, I keep getting this error which says:
import numpy as np
ModuleNotFoundError: No module named 'numpy'
Now I have looked around here a little and I found a post saying that I needed to install the latest version of NumPy, but when I go to do that, I get back this:
Requirement already satisfied: NumPy in c:\users\username\appdata\local\continuum\anaconda3\envs\cntk-py34\lib\site-packages
SO I really have no idea what is going on here.
Anyway, thanks in advance.
Is your IDE linked to Anaconda env? If you open up the Anaconda prompt and import numpy do you get the same error?
You probably have an environment outside of Anaconda which does not have numpy installed.
In my case, I was executing [filename].py from the Anaconda prompt as I would a batch file and was getting this error. I confirmed numpy was install by executing pip list.
Funning python and passing the script file name as an argument, eg python [filename].py, correctly imported the numpy module and executed the script without error.
I am trying to run tensorboard but I am getting the following import error;
AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'
I have tried reinstalling setuptools and distribute. This is for Python3.5.
This stacktrace is going into the Protobuf codebase so this doesn't look like a bug in TensorFlow. It looks like something is wrong with the setuptools on your system. Maybe try reinstalling it? You can also try installing TensorFlow inside a virtualenv.
See also: https://github.com/tensorflow/tensorflow/issues/6863