New user install flow evaluation
I was installing Mesa into a fresh environment & approaching it from a new users perspective...
pip install mesa
<pick example>
solara run app.py
solara gives me this error:
Could not import SolaraViz. If you need it, install with 'pip install --pre mesa[viz]'
so then I run:
pip install --pre mesa[viz]
which returns:
zsh: no matches found: mesa[viz]
How do we fix this / make it easier for users?
First, that --pre remark should not be there because it will break the solara dependencies.
Second, debate whether the ui is part of the default stuff that should just work or not.
viz is a defined extra, so that can’t be it. Claude sounds plausible:
The problem is actually related to how the shell (zsh in your case) interprets the square brackets.
When you try to run
pip install --pre mesa[viz], the zsh shell tries to interpret[viz]as a pattern matching expression, which is why you get the "no matches found" error. This is a common issue with zsh and bash when dealing with package extras.Here are two ways to fix this:
- Escape the brackets or quote the entire package name:
pip install --pre "mesa[viz]" # OR pip install --pre mesa\[viz\]
- Use the alternative syntax with quotes:
pip install --pre 'mesa[viz]'For making this easier for users, I can suggest a few approaches:
- Update the documentation to explicitly show the quoted version:
pip install --pre "mesa[viz]"
Add a note explaining that shell users may need to quote or escape the brackets.
Consider providing a requirements.txt or similar that includes the visualization dependencies by default.
Note that on the landing page on read the docs in the installation part, the zsh error is explicitly mentioned:
On a Mac, this command might cause an error stating zsh: no matches found: mesa[all]. In that case, change the command to pip install -U "mesa[rec]".
I wonder if some of the issues with #141 are related to this. People haven't gone into detail on their bugs, so this is only conjecture.
@jackiekazil I tried the above and ran into this error when importing mesa. Not sure if this is a problem only only end or not:
partially initialized module 'pandas' has no attribute '_pandas_datetime_CAPI' (most likely due to a circular import)
Note: this is on a fresh conda env
@2guud4u can you file new issue for your problem? (The issue filing process will help us understand the complete issue you are having.) https://github.com/projectmesa/mesa/issues/new/choose
Hi @jackiekazil, I’m starting on the install flow evaluation. I plan to test on Windows 11, Ubuntu 22.04, and macOS with Python 3.11 and 3.12. Should I prioritize specific platforms, Python versions, or other aspects? Thanks!
@jackiekazil I have fixed it, it was a firefox issue. Fixed after reinstalling!
@IDevSharma1 That sounds good! Let's us know what you find!
PyCon sprint contributors might have a fresh perspective on this.
i have looked into the issue and am confident that i would be able to solve the issue , can you please assign this issue to me ?