Skip to main content

pyCharm installation problem

Ongoing

Comments

7 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Eli Towle
    Gurobi Staff Gurobi Staff

    It looks like line 16 of \( \texttt{setup.py} \) was changed from

    import os,sys,shutil

    to

    import os,sys,shutilpython setup.py install

    Could you change line 16 back to \( \texttt{import os,sys,shutil} \), then try running \( \texttt{python setup.py install} \) again?

    0
  • livio basile
    Gurobi-versary
    First Comment
    First Question

    yes it works!!! but now I've another issue: 

    Traceback (most recent call last):
    File "<input>", line 1, in <module>
    File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
    File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
    File "/Users/liviobasile/Documents/Machine Learning/Optimization methods /Esempio OC2.py", line 1, in <module>
    import gurobipy as gp
    File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
    ModuleNotFoundError: No module named 'gurobipy'

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Have you followed the "Manual instructions in our Knowledge Base article : How do I use Gurobi with PyCharm?

    0
  • livio basile
    Gurobi-versary
    First Comment
    First Question

    Yes I have. I followed the “manual installation”. After I run the last command “sudo python setup.py install” what should I do? When i text “import gurobipy” and run my code it calls the error I mentioned before... thanks in advance!

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Livio - 

    Thanks for trying that. I'm sorry to hear it still isn't working for you. Can you please share a screenshot of the full Pycharm terminal window when you run 'sudo python setup.py install' so I can see if I can help locate the issue?

    Thanks, Gwyneth

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Livio - One other question. Can you let us know what processor your Mac has? G.

    0

Post is closed for comments.