In a typical workflow, each PyCharm project will have a virtual environment (venv) associated with it. The gurobipy package must be available to the python interpreter of that venv. To make the package available:
- Install the full version of Gurobi Optimizer.
- Go to a terminal window from within PyCharm, using the button at the bottom left.
- In this terminal window, go to Gurobi's installation folder (GUROBI_HOME) and run python setup.py install.
(venv) bash-3.2$ which python
(venv) bash-3.2$ cd /Library/gurobi900/mac64/
(venv) bash-3.2$ python setup.py install