1

Following rasterio installation guidelines (rasterio.readthedocs.io) I downloaded the relevant wheel files from Cristoph's list (link) and installed them successfully on my Windows 10 system. Yet I am failing to install them in my virtualenv I created using Pycharm. For sanity check, I tested I was able to install numpy with pip in the virtualenv.

$ pip install -U pip
$ pip install GDAL-1.11.2-cp27-none-win32.whl
$ pip install rasterio-0.24.0-cp27-none-win32.whl

Unfrutently the red error message is not very informative. I have checked the bases I know such as, the system, and python are 64, pip is linked to python 3.8. This is all I can think of. Below you can see a few of my steps.

enter image description here

Update: It seems that setting up the virtual environment manual from the Command Prompt and not Pycharm paved the way to a successful GDFAL and Rasteiro installation.

  1. Download virtualenv: C:\Users\t>pip install --user virtualenv
  2. Create virtualenv: C:\Users\t\Downloads>python -m venv
  3. Activate: C:\Users\t\Downloads>test_virtual_env_i\env\Scripts\activate

Then installing the respective downloaded GDAL wheel worked out of the box:

  1. (env) C:\Users\t\Downloads>pip install GDAL-3.0.2-cp38-cp38- win_amd64.whl
  2. (env) C:\Users\esaiet\Downloads>pip install rasterio-1.1.1-cp38-cp38-win_amd64.whl

Before I can conclude the issue is resolved, the qyestion is what is the difference between the my virtualenv installation and Pycharm.

5
  • try installing gdal 2.4 with rasterio 1.0.24
    – ziggy
    Commented Dec 3, 2019 at 19:49
  • 2.4.1 did not work, I will update in my post above.
    – icypy
    Commented Dec 3, 2019 at 20:46
  • It works for me. Make sure you are installing the correct version of each, i.e if you're using Python 3.8 64bit don't use the GDAL wheel for Python 3.5 or Python 2 (you said you tried to install GDAL-2.4.1-cp35-cpm35m-win_amd64.whl and GDAL-1.11.2-cp27-none-win32.whl), you need GDAL-3.0.2-cp38-cp38-win_amd64.whl and rasterio-1.1.1-cp38-cp38-win_amd64.whl.
    – user2856
    Commented Dec 4, 2019 at 0:26
  • Yup, I have python 3.8 and tried installing GDAL rasterio‑1.1.1‑cp38‑cp38‑win_amd64.whl. I tried GDAL 2.4.1 because you suggested it. cp27 was listed as the general instructions. Can you post your exact steps? How did you create the virtualenv, what python verisn did you use,everything?
    – icypy
    Commented Dec 4, 2019 at 18:40
  • After installing python, you may have to upgrade pip by python -m pip install --upgrade pip and then install gdal.whl again by GDAL-1.11.2-cp27-none-win32.whl. Make sure that python directory are defined in OS path.
    – ArashMad
    Commented Aug 18, 2020 at 7:14

1 Answer 1

1

I followed these steps and it worked find for me.

  • OS: Microsoft Windows x64
  1. Install python 3.5
  2. Add x:\<python_directory>, x:\<python_directory>\Lib and x:\<python_directory>\Scripts to system environment variable PATH.
  3. Upgrade the pip by running code python -m pip install --upgrade pip
  4. Install compatible version of GDAL by python -m pip install GDAL-3.0.4-cp35-cp35m-win_amd64.whl
  5. Install compatible version of Rasterio by python -m pip install rasterio-1.1.2-cp35-cp35m-win_amd64.whl

Following images proves the result:

enter image description here

And when I ran the last command (number 5) following results were shown:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.