Working with TEMOA on an M1 MacBook

39 views
Skip to first unread message

Amirashkan Askari

unread,
Jan 19, 2024, 3:49:55 PMJan 19
to Temoa Project
Hello Temoa community
I want to use Temoa on my laptop, an M1 MacBook Pro. After installing Miniconda3 on my system, I tried to create and activate an environment based on the environment.yml file in the temoa's Github repository. Upon engaging with the Terminal, I received the error message below.

"PackagesNotFoundError: The following packages are not available from current channels:

  - pyomo=5.5*

  - pyomo.extras

  - python=3.7.3*

Current channels:

  - https://repo.anaconda.com/pkgs/main/osx-arm64

  - https://repo.anaconda.com/pkgs/r/osx-arm64

  - https://conda.anaconda.org/conda-forge/osx-arm64

I assumed the issue was because the pyomo and python versions specified in the .yml file were too old to be compatible with an M1 laptop. Thus, I deleted the version numbers from the .yml file. However, the issue with the pyomo.extras was not addressed, even by trying to install it separately through pip. So, I deleted the pyomo.extras line from the .yml file and created and activated the environment. As you may guess, this was not a great strategy because when I run temoa, I get errors that seem to be related to my arbitrary changes to the .yml file. 

I would appreciate any help or insights.

Qoriatul Fitriyah

unread,
Jan 19, 2024, 6:11:27 PMJan 19
to Temoa Project
Dear Amirashkan,
I encountered the same problem. The environment is the main issue. Now, I'm working again to get it fixed, for now, the environment seems okay, but I haven't touched the Temoa part yet. Will keep you updated if I succeed!

--
You received this message because you are subscribed to the Google Groups "Temoa Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to temoa-projec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/temoa-project/177f0fab-b5b5-4eb0-86a4-9679de49e950n%40googlegroups.com.

Jeff H

unread,
Jan 19, 2024, 6:11:31 PMJan 19
to Temoa Project
Hello Amirashkan-

I am assuming you are using the energysystem branch of the code.  An alternative to using Conda and the config.yml file that conda uses is to use pip to download the dependencies from PyPI.  I’m not sure why the .yml isn’t working for you.  The versions specified are quite dated and probably not supported (via conda) for M1.

I have the project energysystem branch running on M2 architecture using the recipe below.  As an aside, I’m midway through many upgrades that will bring the whole project up to current python/pyomo versions, but until then this should work:

1.  Install your own version of python from python.org by looking through the earlier available builds.  The build I used is noted in the comments in the attached file

2.  Create a virtual environment that uses this specific version of python, call it whatever, I call it “venv37” so I know the core python version 

$: python3.7 -m venv venv37

3.  Activate that venv (there are many tutorials on using the venv module online if this is confusing)

$: source venv37/bin/activate


4.  While inside the venv, use pip to install everything in the attached requirements.txt file (the command is shown in the file)

5.  As noted in the file, you will also need a solver on your machine and that should be installed separately as well if you don’t have one.  I recommend ‘cbc’ as a starter.  There are install instructions on this page:  https://github.com/coin-or/Cbc.  I see that there is a conda and hombebrew option for Mac.  I’m a homebrew user and that works.


Most common IDE’s have tools to automate much of this, but you’ll still need to go to python.org to get the base version of python installed, and the solver.

Best,
Jeff

requirements.txt
Reply all
Reply to author
Forward
0 new messages