-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Dev install troubleshooting #19962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev install troubleshooting #19962
Conversation
doc/devel/development_setup.rst
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please line-wrap this to 80 characters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably worth moving the testing and docs dependencies sections to this site.
Note also that there is #17096, which should help preventing dependency errors in dev setups based on conda.
@@ -37,7 +37,7 @@ Running the tests | |||
|
|||
In the root directory of your development repository run:: | |||
|
|||
pytest | |||
python -m pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another pytest
call some lines down.
doc/devel/development_setup.rst
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.