[Solved]How to install gmpy2 on Pycharm Windows 10

Sumedha Gn
2 min readDec 26, 2019

This assumes that you already have Visual Studio (Code) installed. If you have not installed it, go to https://visualstudio.microsoft.com/downloads/. I was facing multiple errors when I tried installing gmpy2 on Pycharm. This should work for similar errors other than the ones I have faced.

  1. Error 1, visual code c++ required
  2. Error: command ‘.\\cl.exe’ failed with exit status 2.

Solution:

  1. Go to: https://www.lfd.uci.edu/~gohlke/pythonlibs/

2. Search for: GMPY

  • Depending on your python version, download the required gmpy2 wheel. My python version is 3.7, so I downloaded gmpy2–2.0.8-cp37-cp37-win_amd64.whl.
  • cp37 = Cpython3.7

3. On your terminal, run:

  • pip install C:\Downloads\gmpy2–2.0.8-cp37-cp37-win_amd64.whl
  • Make sure your gmpy2 file is in the stated directory
  • On successful installation, you will see this.

4. Go to your python folder that you are working on and place the processed gmpy2 lib package into the lib folder

5. Restart your workbench.

Hope this helps!

--

--

Sumedha Gn

Documenting errors I’ve faced so you can save time trying to resolve them, feel free to let me know how I can improve too!