Traceback (most recent call last):
File "portfolio.py", line 25, in <module>
import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
Traceback (most recent call last):
File "portfolio.py", line 23, in <module>
import pandas as pd
ImportError: No module named pandas
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
If I type python portfolio.py
If I try gurobi.sh portfolio.py
I assume gurobi.sh portfolio.py is the right way to call this script, do you have any idea why it doesn't work with pandas library ? It seems to me it works with numpy , scipy , matplotlib if I call gurobi.sh portfolio.py
Hi,
If I type python portfolio.py
This is the correct call and it should work fine. For me it is working fine. Did you change anything in your Anaconda installation? What output do you get if you typeconda list matplotlibFor me this looks like:# packages in environment at /Library/anaconda:
#
matplotlib 2.0.2 np112py27_0
You can try to install matplotlib again using:conda install matplotlib
If I try gurobi.sh portfolio.py
This will not work, as gurobi.sh is a very basic Python installation with almost no additional modules.
I assume gurobi.sh portfolio.py is the right way to call this script, do you have any idea why it doesn't work with pandas library ? It seems to me it works with numpy , scipy , matplotlib if I call gurobi.sh portfolio.py
No, it does not. They are not installed in gurobi.sh. It stops working on the first import (import pandas) the others are not executed.