henze-research-group / MODRLC

The Advanced Controls Test Bed (ACTB) is a virtual buildings test bed that interfaces external controllers to high-fidelity Spawn of EnergyPlus models.
26 stars 9 forks source link

Set `.python-version` for pyenv to 3.9 #45

Closed mattrobmattrob closed 7 months ago

mattrobmattrob commented 8 months ago

Allow users of pyenv to have a clear direction for the required Python version. This fixes the following when running pip install -r requirements.txt:

  ERROR: Command errored out with exit status 1:
   command: /Users/mattrobinson/.pyenv/versions/3.6.15/bin/python3.6 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4y/7k0ckw7n69v9bgsvt6x7bnrc0000gn/T/pip-install-l36l1m8u/matplotlib_8a69c6d6a7274f1d8dcc7d7d6aa54685/setup.py'"'"'; __file__='"'"'/private/var/folders/4y/7k0ckw7n69v9bgsvt6x7bnrc0000gn/T/pip-install-l36l1m8u/matplotlib_8a69c6d6a7274f1d8dcc7d7d6aa54685/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/4y/7k0ckw7n69v9bgsvt6x7bnrc0000gn/T/pip-pip-egg-info-kque4r4o
       cwd: /private/var/folders/4y/7k0ckw7n69v9bgsvt6x7bnrc0000gn/T/pip-install-l36l1m8u/matplotlib_8a69c6d6a7274f1d8dcc7d7d6aa54685/
  Complete output (80 lines):
  Traceback (most recent call last):
    File "/Users/mattrobinson/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
      yield saved
    File "/Users/mattrobinson/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
      yield
    File "/Users/mattrobinson/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
      _execfile(setup_script, ns)
    File "/Users/mattrobinson/.pyenv/versions/3.6.15/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
      exec(code, globals, locals)
    File "/var/folders/4y/7k0ckw7n69v9bgsvt6x7bnrc0000gn/T/easy_install-ms2u1l2y/numpy-1.26.2/setup.py", line 22, in <module>
      '.'.join(str(n) for n in sys.version_info[:3]))
  RuntimeError: Python version >= 3.9 required.

Then satisfy the tensorflow Python version requirements to fix:

ERROR: Could not find a version that satisfies the requirement tensorflow<=2.5,>=2.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for tensorflow<=2.5,>=2.0