Skip to content
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

New user install flow evaluation #2615

Open
jackiekazil opened this issue Jan 13, 2025 · 6 comments
Open

New user install flow evaluation #2615

jackiekazil opened this issue Jan 13, 2025 · 6 comments

Comments

@jackiekazil
Copy link
Member

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?

@quaquel
Copy link
Member

quaquel commented Jan 13, 2025

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.

@EwoutH
Copy link
Member

EwoutH commented Jan 13, 2025

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:

  1. Escape the brackets or quote the entire package name:
pip install --pre "mesa[viz]"
# OR
pip install --pre mesa\[viz\]
  1. Use the alternative syntax with quotes:
pip install --pre 'mesa[viz]'

For making this easier for users, I can suggest a few approaches:

  1. Update the documentation to explicitly show the quoted version:
pip install --pre "mesa[viz]"
  1. Add a note explaining that shell users may need to quote or escape the brackets.

  2. Consider providing a requirements.txt or similar that includes the visualization dependencies by default.

@quaquel
Copy link
Member

quaquel commented Jan 13, 2025

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]".

@jackiekazil
Copy link
Member Author

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.

@2guud4u
Copy link

2guud4u commented Jan 14, 2025

@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

@jackiekazil
Copy link
Member Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants