title: Problems installing TensorFlow and AIMA code on m1 silicon
body: <p>I'm trying to install and run <a href="https://https:/https://github.com/aimacode/aima-python" rel="nofollow noreferrer">AIMA's</a> code on my m1 Mac running macOS 12.5.</p>
  <p>Before installing AIMA's code, I installed homeBrew and TensorFlow following these <a href="https://caffeinedev.medium.com/how-to-install-tensorflow-on-m1-mac-8e9b91d93706" rel="nofollow noreferrer">steps</a> using a Virtual environment with python 3.8. I named this environment AIMA_ENV. No errors were shown this far.</p>
  <p>Once I had successfully installed tensroflow &amp; ran the benchmark using a jupyter notebook, I began to follow AIMA's <a href="https://github.com/aimacode/aima-python" rel="nofollow noreferrer">installation instructions</a>. Everything was running smooth until I ran the command</p>
  <p><code>pip install -r requirements.txt</code></p>
  <p>this returned the first two errors:</p>
  <pre><code>ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
  ERROR: No matching distribution found for tensorflow
  </code></pre>
  <p>Note that I was running all these commands on the terminal where I had my virtual environment enabled and where I had already successfully installed &amp; tested TensorFlow.</p>
  <p>I decided to ignore these errors and  continue with the installation guide. All continued to run smooth until I ran the test <code>py.test</code></p>
  <p>Errors found:</p>
  <pre><code>================================================================================================== ERRORS ==================================================================================================
  __________________________________________________________________________________ ERROR collecting tests/test_agents.py ___________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_agents.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_agents.py:5: in &lt;module&gt;
      from agents import (ReflexVacuumAgent, ModelBasedVacuumAgent, TrivialVacuumEnvironment, compare_agents,
  agents.py:34: in &lt;module&gt;
      from ipythonblocks import BlockGrid
  E   ModuleNotFoundError: No module named 'ipythonblocks'
  _________________________________________________________________________________ ERROR collecting tests/test_agents4e.py __________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_agents4e.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_agents4e.py:5: in &lt;module&gt;
      from agents4e import (ReflexVacuumAgent, ModelBasedVacuumAgent, TrivialVacuumEnvironment, compare_agents,
  agents4e.py:39: in &lt;module&gt;
      from ipythonblocks import BlockGrid
  E   ModuleNotFoundError: No module named 'ipythonblocks'
  ____________________________________________________________________________________ ERROR collecting tests/test_csp.py ____________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_csp.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_csp.py:3: in &lt;module&gt;
      from csp import *
  csp.py:11: in &lt;module&gt;
      from sortedcontainers import SortedSet
  E   ModuleNotFoundError: No module named 'sortedcontainers'
  ______________________________________________________________________________ ERROR collecting tests/test_deep_learning4e.py ______________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_deep_learning4e.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_deep_learning4e.py:5: in &lt;module&gt;
      from learning4e import DataSet, grade_learner, err_ratio
  learning4e.py:7: in &lt;module&gt;
      from qpsolvers import solve_qp
  E   ModuleNotFoundError: No module named 'qpsolvers'
  _________________________________________________________________________________ ERROR collecting tests/test_knowledge.py _________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_knowledge.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_knowledge.py:3: in &lt;module&gt;
      from knowledge import *
  knowledge.py:10: in &lt;module&gt;
      from logic import (FolKB, constant_symbols, predicate_symbols, standardize_variables,
  logic.py:40: in &lt;module&gt;
      import networkx as nx
  E   ModuleNotFoundError: No module named 'networkx'
  _________________________________________________________________________________ ERROR collecting tests/test_learning.py __________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_learning.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_learning.py:3: in &lt;module&gt;
      from learning import *
  learning.py:7: in &lt;module&gt;
      from qpsolvers import solve_qp
  E   ModuleNotFoundError: No module named 'qpsolvers'
  ________________________________________________________________________________ ERROR collecting tests/test_learning4e.py _________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_learning4e.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_learning4e.py:4: in &lt;module&gt;
      from learning4e import *
  learning4e.py:7: in &lt;module&gt;
      from qpsolvers import solve_qp
  E   ModuleNotFoundError: No module named 'qpsolvers'
  ___________________________________________________________________________________ ERROR collecting tests/test_logic.py ___________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_logic.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_logic.py:3: in &lt;module&gt;
      from logic import *
  logic.py:40: in &lt;module&gt;
      import networkx as nx
  E   ModuleNotFoundError: No module named 'networkx'
  __________________________________________________________________________________ ERROR collecting tests/test_logic4e.py __________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_logic4e.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_logic4e.py:3: in &lt;module&gt;
      from logic4e import *
  logic4e.py:37: in &lt;module&gt;
      from agents import Agent, Glitter, Bump, Stench, Breeze, Scream
  agents.py:34: in &lt;module&gt;
      from ipythonblocks import BlockGrid
  E   ModuleNotFoundError: No module named 'ipythonblocks'
  _______________________________________________________________________________ ERROR collecting tests/test_perception4e.py ________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_perception4e.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_perception4e.py:5: in &lt;module&gt;
      from perception4e import *
  perception4e.py:3: in &lt;module&gt;
      import cv2
  E   ModuleNotFoundError: No module named 'cv2'
  _________________________________________________________________________________ ERROR collecting tests/test_planning.py __________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_planning.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_planning.py:5: in &lt;module&gt;
      from planning import *
  planning.py:11: in &lt;module&gt;
      from csp import sat_up, NaryCSP, Constraint, ac_search_solver, is_constraint
  csp.py:11: in &lt;module&gt;
      from sortedcontainers import SortedSet
  E   ModuleNotFoundError: No module named 'sortedcontainers'
  __________________________________________________________________________ ERROR collecting tests/test_probabilistic_learning.py ___________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_probabilistic_learning.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_probabilistic_learning.py:5: in &lt;module&gt;
      from learning import DataSet
  learning.py:7: in &lt;module&gt;
      from qpsolvers import solve_qp
  E   ModuleNotFoundError: No module named 'qpsolvers'
  ________________________________________________________________________________ ERROR collecting tests/test_probability.py ________________________________________________________________________________
  ImportError while importing test module '/Users/cosmic/Desktop/aima-python/tests/test_probability.py'.
  Hint: make sure your test modules/packages have valid Python names.
  Traceback:
  ../../mambaforge/envs/AIMA_ENV/lib/python3.8/importlib/__init__.py:127: in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
  tests/test_probability.py:3: in &lt;module&gt;
      from probability import *
  probability.py:6: in &lt;module&gt;
      from agents import Agent
  agents.py:34: in &lt;module&gt;
      from ipythonblocks import BlockGrid
  E   ModuleNotFoundError: No module named 'ipythonblocks'
  ========================================================================================= short test summary info ==========================================================================================
  ERROR tests/test_agents.py
  ERROR tests/test_agents4e.py
  ERROR tests/test_csp.py
  ERROR tests/test_deep_learning4e.py
  ERROR tests/test_knowledge.py
  ERROR tests/test_learning.py
  ERROR tests/test_learning4e.py
  ERROR tests/test_logic.py
  ERROR tests/test_logic4e.py
  ERROR tests/test_perception4e.py
  ERROR tests/test_planning.py
  ERROR tests/test_probabilistic_learning.py
  ERROR tests/test_probability.py
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 13 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  ============================================================================================ 13 errors in 2.81s ============================================================================================
  (AIMA_ENV) cosmic@Cosmics-MacBook-Air aima-python % 
  </code></pre>
  <p>I don't know how to resolve these errors.  Is there something else I could try?</p>
  <p>After updating my requirements.txt file to</p>
  <pre><code>cvxopt
  image
  ipython
  ipythonblocks
  ipywidgets
  jupyter
  keras
  matplotlib
  networkx
  numpy
  opencv-python
  pandas
  pillow
  pytest-cov
  qpsolvers
  scipy
  sortedcontainers
  </code></pre>
  <p>and rerunning the <code> pip install -r requirements.txt</code> I am now getting these <a href="https://github.com/canacosmic/errorsAIMA/blob/main/newErrors.rtf" rel="nofollow noreferrer">new errors</a></p>