Standard installation method is not working
See original GitHub issueProblem description
I have a working distribution of Calliope
on my machine, and it works great. However, I’m helping a colleague install it on his machine, and the install is not working. It seems the default is to import Calliope 0.6.2
, and there are errors with the enum
package. I’ve included the full traceback below.
Steps to reproduce the problem
I use the standard installation from a command line:
conda create -c conda-forge -n calliope_alt calliope
which creates a new environment called calliope_alt
with the package in it (I call it calliope_alt
since my working distribution is an environment named calliope
). However, when I open a python3 interpreter and try to import calliope
, I get a set of errors:
(calliope_alt) $ python3
Python 3.6.10 | packaged by conda-forge | (default, Apr 24 2020, 16:27:41)
[GCC Clang 9.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import calliope
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/calliope/__init__.py", line 2, in <module>
from calliope.core import AttrDict, Model, read_netcdf, _logger, set_log_level
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/calliope/core/__init__.py", line 1, in <module>
from calliope.core.model import Model, read_netcdf
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/calliope/core/model.py", line 28, in <module>
from calliope.backend.run import run as run_backend
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/calliope/backend/run.py", line 14, in <module>
import calliope.backend.pyomo.model as run_pyomo
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/calliope/backend/pyomo/model.py", line 16, in <module>
import pyomo.core as po # pylint: disable=import-error
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/core/__init__.py", line 14, in <module>
from pyomo.core.base import *
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/core/base/__init__.py", line 11, in <module>
import pyomo.core.kernel
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/core/kernel/__init__.py", line 15, in <module>
import pyomo.opt
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/opt/__init__.py", line 14, in <module>
from pyomo.opt.base import *
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/opt/base/__init__.py", line 14, in <module>
from pyomo.opt.base.convert import *
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/opt/base/convert.py", line 16, in <module>
from pyomo.opt.base.formats import guess_format
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyomo/opt/base/formats.py", line 16, in <module>
from pyutilib.enum import Enum
File "/Users/aph416/opt/anaconda3/envs/calliope_alt/lib/python3.6/site-packages/pyutilib/enum/__init__.py", line 18, in <module>
package) that supersedes this library.""")
ImportError: pyutilib.enum has been removed.
Python 3 now has an enum implementation in the standard library (also
available for older Python versions as the third-party enum34 PyPI
package) that supersedes this library.
This seems to be related to this error, but I could not figure out a quick fix. On closer inspection, I see that my Calliope
version is 0.6.2
. I’ve tried forcing conda
to install a specific version using calliope=0.6.5
or calliope=0.6.4
, but this doesn’t solve the problem.
Calliope version
I’m trying to install 0.6.5 (I was originally trying for 0.6.4, but this seems to pop up for any version). However, conda
seems to be installing 0.6.2.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Just remove coincbc (referring to the CBC solver) from the list @bbrannon4, since it isn’t available via conda forge for Windows
In case anyone runs into this issue, running the install with the following command seems to work (credit to @jfallon1997, similar idea to @timtroendle 's above):