简体   繁体   中英

Installing gurobipy package in a custom virtual enviroment in Pycharm

First of all thanks in advance, and sorry if I made the question too long, I tried to be the clearest as possible.

I am trying to install the gurobipy module in my enviroment on Pycharm. I have already installed gurobi on my computer (Version 9.0.2) which is compatible with Python 3.7

But I get the error ModuleNotFoundError: No module named 'gurobipy' when I am trying. I check on my interpreter installed packages, and the gurobipy package is not listed as installed (not a surprise until here)

In order to install it I go to my project interpreter, install packages, look for gurobipy and click install. But I get the following error:

ERROR: Could not find a version that satisfies the requirement gurobipy (from versions: none)
ERROR: No matching distribution found for gurobipy

在此处输入图像描述

I tried to run the command pip install --user gurobipy on my pycharm terminal as recomended in the error window but I get the following:

Requirement already satisfied: gurobipy in c:\programdata\anaconda3\lib\site-packages (9.0.1)

If I type pip list on my terminal I can see that the gurobipy version is gurobipy 9.0.1.

I would really grateful if you could give me any idea of what is happening here. Thanks in advance!!

There is no pip package for gurobipy, yet. Please navigate to your Gurobi home directory and run python setup.py install while your environment is active.

You may also use the conda installation package as described here .

This guide explains the different ways to install the Gurobi Python extension and should help you get started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM