1

I am new to python and am trying to run unit tests for this project: https://github.com/matrix-org/synapse

I am running tox from the top level of the project. I get this error: exceptions.ImportError: No module named pymacaroons

But pymacaroons is already installed using pip. To my knowledge, I only have one version of python. Really stumped here.

phd
  • 82,685
  • 13
  • 120
  • 165
cheez
  • 15
  • 4

2 Answers2

3

tox creates its own virtual environments and installs dependencies according to tox.ini. pymacaroons is not listed in tox.ini hence it's not installed. To install it either add pymacaroons to tox.ini (section [testenv], key deps) or add -rrequirements.txt to tox.ini and list pymacaroons in the requirements.txt.

phd
  • 82,685
  • 13
  • 120
  • 165
0

If you have -rrequirements.txt in your tox.ini and list pymacaroons in requirements.txt and you're still having issues it's likely that tox is not updating, removing the folder .tox will force tox to update

Mia Altieri
  • 19
  • 1
  • 4