LookupError: You must have test.fm >= 1.0.4 installed before (https://github.com/grafos-ml/frappe)

on bench update or bench setup requirements you get below error

$ /home/frappe/frappe-bench/env/bin/pip install -q -U -e /home/frappe/frappe-bench/apps/custom_app 
  ERROR: Command errored out with exit status 1:
   command: /home/frappe/frappe-bench/env/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kxewf_it/frappe_47e758e52ac345de9f0001eb5a8aaf3e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kxewf_it/frappe_47e758e52ac345de9f0001eb5a8aaf3e/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 /tmp/pip-pip-egg-info-fuh6_fu9
       cwd: /tmp/pip-install-kxewf_it/frappe_47e758e52ac345de9f0001eb5a8aaf3e/
  Complete output (12 lines):
  Traceback (most recent call last):
    File "/tmp/pip-install-kxewf_it/frappe_47e758e52ac345de9f0001eb5a8aaf3e/setup.py", line 8, in <module>
      import testfm
  ModuleNotFoundError: No module named 'testfm'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-kxewf_it/frappe_47e758e52ac345de9f0001eb5a8aaf3e/setup.py", line 10, in <module>
      raise LookupError("You must have test.fm >= 1.0.4 installed before (https://github.com/grafos-ml/frappe)")
  LookupError: You must have test.fm >= 1.0.4 installed before (https://github.com/grafos-ml/frappe)
  ----------------------------------------

Solution:

go to app/you_app/requirements.txt and comment out frappe . i.e. it should look like below

# frappe # https://github.com/frappe/frappe is installed during bench-init

Thanks
Ashish
GreyCube Technologies

2 Likes

Reference: chore: remove frappe from requirements.txt by ankush · Pull Request #25501 · frappe/erpnext · GitHub

2 Likes