It is impossible to import/install Basemap - matplotlib-basemap

I have tried everything to import basemap and I really need it. Can somebody fix my problem.
Here is the error I got.
ImportError Traceback (most recent call last)
<ipython-input-7-ad7506b589db> in <module>
9 from matplotlib import path
10 import os, glob
---> 11 from mpl_toolkits.basemap import Basemap
12 import pandas as pd
13 from pylab import *
~/miniconda3/envs/venv1/lib/python3.8/site-packages/mpl_toolkits/basemap/__init__.py in <module>
48 from matplotlib.image import imread
49 import sys, os, math
---> 50 from .proj import Proj
51 import numpy as np
52 import numpy.ma as ma
~/miniconda3/envs/venv1/lib/python3.8/site-packages/mpl_toolkits/basemap/proj.py in <module>
4 import pyproj
5 import math
----> 6 from matplotlib.cbook import dedent
7
8 __version__ = '1.2.2'
ImportError: cannot import name 'dedent' from 'matplotlib.cbook' (/deneme/users/cet/miniconda3/envs/venv1/lib/python3.8/site-packages/matplotlib/cbook/__init__.py)
I have tried to upgrade and downgrade matplotlib, pip install matplotlib and conda forge..
So, any help would be greatfull.

Related

ImportError: cannot import name 'compute_associations' from 'dython.nominal'

I just installed dython using pip install dython to use the tabsyndex. Here is the block of import
import pandas as pd
from tabsyndex import tabsyndex
from sklearn.model_selection import train_test_split
and it always shows
ImportError: cannot import name 'compute_associations' from 'dython.nominal'
Are there any way to import compute associations?
So far I tried reinstalling dython, but it always show the same error.

No module named 'socketio' when from flask_socketio import SocketIO, emit

I am developing a project in Python 3.7 that uses flask-sockeio but when I try to import:
from flask_socketio import SocketIO, emit
i receive this error:
from flask_socketio import SocketIO, emit
File "C:\Users\G.Ventura\AppData\Local\Programs\Python\Python37-32\lib\site-packages\flask_socketio\__init__.py", line 21, in <module>
import socketio
ModuleNotFoundError: No module named 'socketio
Someone use flask-sockeio on python3 ?
thanks

import error for ibm_db using PyInstaller

How I can fix the bellow error?
I have a python code using GUI (tkinter) to get value and use the value to get data from ibm DB.
however, when I wanted to change it from py to exe using pyinstaller I get the bellow message:
my imports are:
import tkinter as tk
from tkinter import filedialog
import pandas as pd
import ibm_db
import ibm_db_dbi
import pandastable
from Calendar import Calendar
import numpy as np
import matplotlib.pyplot as plt
import calendar
import datetime
import sys
the code I am using
pyinstaller -F -w myfile.py
thanks $

Unable to resolve the ImportError: cannot import name 'spline' from 'scipy.interpolate'

Tried to import the following libraries in python.
import quantsbin.derivativepricing as qbdp
import scipy.interpolate.interpnd
from scipy.interpolate import interp1d
from scipy.interpolate import spline
Got the following error:
ImportError: cannot import name 'spline' from 'scipy.interpolate'
This function was deprecated in scipy 0.19.0 and removed in scipy 1.3.0.
So either downgrade your scipy to 1.2.3, or use the recommended replacement make_interp_spline /BSpline

import ImageTk for google earth engine

I want to import ee.mapclient
but when I do this the following error is returned:
Traceback (most recent call last):
File "<ipython-input-16-5f312fd5c732>", line 1, in <module>
import ee.mapclient
File "C:\Users\Stefano\Anaconda2_2\lib\site-packages\ee\mapclient.py", line 43, in <module>
import ImageTk # pylint: disable=g-import-not-at-top
ImportError: No module named ImageTk
I am using anaconda and have installed pillow and PIL. Within my PIL folder in site-packages there is a file caled ImageTk.
When I do this:
from PIL import Image, ImageTk
everything imports fine, but for some reason ee.mapclient is not recognizing this.
A link to the python code used in mapclient.py can be found here:
https://github.com/google/earthengine-api/blob/master/python/ee/mapclient.py
Edit mapclient to put "from PIL import Image,ImageTk " in try block ,