Dev install troubleshooting#19962
Conversation
|
|
||
| Troubleshooting | ||
| =============== | ||
| * pytest - If the test runner is failing, verify that the pytest you are using is installed in your environment using the ``which pytest`` and ``which python`` commands. If the paths are not the same, install pytest in your environment. |
There was a problem hiding this comment.
Please line-wrap this to 80 characters.
There was a problem hiding this comment.
installed the rewrap extension, dunno why my wraps are wonky
|
Might also be worth changing the "how to run the tests" docs to use |
|
Ha, I just had this problem until it twigged that I had to install pytest "locally". It would not hurt to add this to https://matplotlib.org/stable/devel/dependencies.html as well since it really needs to be installed in your development environment |
|
There's also a dependency section in this doc, so uh @timhoffm is there a plan to consolidate? |
def249f to
5a4ad91
Compare
| In the root directory of your development repository run:: | ||
|
|
||
| pytest | ||
| python -m pytest |
There was a problem hiding this comment.
There's another pytest call some lines down.
| Troubleshooting | ||
| =============== | ||
| * pytest - If the test runner is failing, verify that the pytest you are using | ||
| is installed in your environment using the ``which pytest`` and ``which python`` | ||
| commands. If the paths are not the same, install pytest in your environment. |
There was a problem hiding this comment.
I have doubts about troubleshooting / FAQ sections. My impression is that they get cluttered with the next best thing someone comes across and accumulate lots of clutter between relevant information.
In this specific case:
- do we need this at all, if we suggest
python -m pytest? - If so, this should move to
testing.rst. While it's a dependency error, users won't know that. It will happen in the context of running tests, so that's the first place to look at in the docs.
There was a problem hiding this comment.
what about having a troubleshooting section in the wiki, and linking to it from the docs? Would be easier to maintain, but still provide info.
There was a problem hiding this comment.
I mostly agree with @timhoffm here: we should just use python -mpytest everywhere and perhaps just document "always use python -mpytest, not pytest", not end up with neverending faq entries.
There was a problem hiding this comment.
changed to -m pytest and dropped the troubleshooting
Don't really know where to put this, but I just spent like half an hour and a lot of install/uninstall/banging my head against a wall trying to figure out why pytest and numpy were conflicting in weird ways until I remembered that in conda you have to usually explicitly install pytest. Figure there are a couple of other really common things that mostly don't go out of date that might be worth including.
5a4ad91 to
6c46b59
Compare
…962-on-v3.4.x Backport PR #19962 on branch v3.4.x (Dev install troubleshooting)
Don't really know where to put this, but I just spent like half an hour and a lot of install/uninstall/banging my head against a wall trying to figure out why pytest and numpy were conflicting in weird ways until I remembered that in conda you have to usually explicitly install pytest. Figure there are a couple of other really common things that mostly don't go out of date that might be worth including.