very beginner here. I'm encountering an error when importing the package rwrap (pip install rwrap).
Here is my code:
import numpy as np
import pandas as pd
import geopandas as gpd
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
import geoplot as gplt
import geoplot.crs as gcrs
from tqdm.auto import tqdm
from rwrap import eurostat
and here is the error:
ImportError Traceback (most recent call last)
Input In [1], in <cell line: 15>()
11 import geoplot.crs as gcrs
13 from tqdm.auto import tqdm
---> 15 from rwrap import eurostat
ImportError: cannot import name 'eurostat' from 'rwrap'
(C:\Users\Alberto\miniconda3\lib\site-packages\rwrap\__init__.py)
no idea what is going on, as I ran the same code on another computer and it works normally.
Also, the package seems correctly installed as if I run:
import sys
'rwrap' in sys.modules
I get "True"
Any ideas? Thank you.
Edit:
Rwrap is a package to integrate R modules into Python. So, I'm trying to call the "eurostat" module to download data and shapefiles from eurostat. I have also tried previous versions of the package with no success, a more likely possibility is that the package is not fully compatible with Python 3.10 (is there a way to downgrade it without uninstalling?)
If I run
import rwrap
print(dir(rwrap))
eurostat is actually not in the output list...
Your error
looks for me like you have
rwrap
(it even give you path to .py file for it), but there is noteurostat
available inrwrap
. Please run following snippetThen write if
eurostat
present in list?