Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Error installing plug-in (error importing pandas) #6

Closed
yipjackie opened this issue Feb 26, 2020 · 3 comments
Closed

Error installing plug-in (error importing pandas) #6

yipjackie opened this issue Feb 26, 2020 · 3 comments
Assignees
Labels
bug Something isn't working migrate

Comments

@yipjackie
Copy link

After a clean install of QGIS 3.10 (downloaded the long-term release for Mac OS from https://www.qgis.org/en/site/forusers/download.html) and the First Aid plug-in, the installing of the CanFlood plug-in gave an error as shown below - suggesting that it needs pandas 0.25.3 or higher.
Screen Shot 2020-02-25 at 10 11 54 AM

Also included here the About QGIS page for reference
Screen Shot 2020-02-26 at 9 14 51 AM

@cefect cefect assigned cefect and s4lt3d and unassigned cefect Feb 26, 2020
@s4lt3d s4lt3d added the bug Something isn't working label Feb 26, 2020
@s4lt3d
Copy link
Collaborator

s4lt3d commented Feb 26, 2020

Pandas not installed or incorrect version installed

Some versions of QGIS may not come with all required python packages.

This issue can be solved with two simple commands shown below.

Example Error Message on Windows
image

Fixing the issue by installing Pandas manually

Open the Python Console in QGIS
image

The Python Console should appear in QGIS and should look similar to to this.
image

Type the following commands in the console.

import pip
pip._internal.main(['install', 'pandas'])

image

image
image

Conclusion

Running the two commands should correctly install pandas, which will allow CanFlood Alpha to open successfully.

@s4lt3d s4lt3d pinned this issue Feb 26, 2020
@yipjackie
Copy link
Author

Thanks Walter! I've had to modify the command slightly as in the screenshot. I think it shows it is still using pandas 0.24.2
Screen Shot 2020-02-26 at 3 37 04 PM

@cefect cefect reopened this Feb 27, 2020
@cefect
Copy link
Collaborator

cefect commented Feb 27, 2020

If you installed QGIS through OSGeo, a better solution is to go through the OsGEO4w shell (executed from this .bat file... sometimes there is a shortcut). On Windows, ensure you right click > run as Administrator:
image

run these commands:

py3_env
python -m pip install pandas

image

If installing other dependencies, replace 'pandas' with whatever you're trying to install.

You can then test it was installed properly by executing these commands (in the same session):

python
import pandas
pandas.__version__

You should see '0.25.3' or higher displayed

image

If this still fails, try uninstalling qgis, and re-installing with the OSGeo4W Network Installer, Advanced Install option. On the 'Select Packages' page, type 'qgis-ltr-full' into the search bar, expand 'Desktop' and ensure the 'New' (or 'Current') version shows 3.10-2 or higher. Then type 'python3-pandas' into the search bar, and ensure 'New' shows 1.0.1-1 or higher. Click through and this should install Qgis 3.10 nicely with Pandas.

This procedure should work for any dependency error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working migrate
Projects
None yet
Development

No branches or pull requests

3 participants