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

Fix invalid pip syntax, use double quotes for portable version (zsh/windows) #4489

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bmerkle
Copy link

@bmerkle bmerkle commented Dec 3, 2024

pip install command with single quotes results in the following error:

Why are these changes needed?

because it results in a pip syntax error

pip install command with single quotes results in the following error:

(venv) C:\work\microsoft\autogen>pip install 'autogen-agentchat==0.4.0.dev8' 'autogen-ext[openai]==0.4.0.dev8'

ERROR: Invalid requirement: "'autogen-agentchat==0.4.0.dev8'": Expected package name at the start of dependency specifier
    'autogen-agentchat==0.4.0.dev8'
    ^

Related issue number

as this is a trivial change, i did not create a separate issue

Checks

pip install command with single quotes results in the following error:

(venv) C:\work\microsoft\autogen>pip install 'autogen-agentchat==0.4.0.dev8' 'autogen-ext[openai]==0.4.0.dev8'

ERROR: Invalid requirement: "'autogen-agentchat==0.4.0.dev8'": Expected package name at the start of dependency specifier
    'autogen-agentchat==0.4.0.dev8'
    ^
@ekzhu
Copy link
Collaborator

ekzhu commented Dec 3, 2024

Ironically this will break usage in ZSH...

Let's use double quotes.

And while you at it, could you also help us fix the whole repo?

@bmerkle
Copy link
Author

bmerkle commented Dec 3, 2024

yes, I will do this.
Lets use double quotes

@bmerkle bmerkle changed the title Update README.md: invalid pip syntax, removed single quotes Fix invalid pip syntax, use double quotes for portable version (zsh/windows) Dec 3, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't have been changed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't have been changed except for updating the installation instructions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't have been changed except for updating the installation instructions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't have been changed except for updating the installation instructions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't have been changed except for updating the installation instructions.

@bmerkle
Copy link
Author

bmerkle commented Dec 4, 2024

I read your comments but IMO these are normal shell scripts, just inside a jupyter notebook cell, so we should update this also.
I have verified that the notebook runs, so there is no error, and it should be consistent between docs and code.

We should maybe consider even to use "%pip install ..." instead of "pip install ...." in the ipynb files (with percentage) as this is a good practice (to enforce installation into the venv envionment).

what do you think ?

Reference:
https://community.databricks.com/t5/data-engineering/whats-the-difference-between-magic-commands-pip-and-sh-pip/td-p/21618
https://stackoverflow.com/questions/65547021/difference-between-pip-and-pip-in-python-jupyter-notebook-and-colab

@ekzhu
Copy link
Collaborator

ekzhu commented Dec 4, 2024

I have verified that the notebook runs, so there is no error, and it should be consistent between docs and code.

My comment was that I saw the outputs of the notebooks have been cleared -- we should keep them

We should maybe consider even to use "%pip install ..." instead of "pip install ...." in the ipynb files (with percentage) as this is a good practice (to enforce installation into the venv envionment).

I agree.

@bmerkle
Copy link
Author

bmerkle commented Dec 4, 2024

I have verified that the notebook runs, so there is no error, and it should be consistent between docs and code.

My comment was that I saw the outputs of the notebooks have been cleared -- we should keep them

ok, sorry i misunderstood you. I have a commit hook for jupyter file to clean the output :-)
should I add the output again and commit again ?

We should maybe consider even to use "%pip install ..." instead of "pip install ...." in the ipynb files (with percentage) as this is a good practice (to enforce installation into the venv envionment).

I agree.

cool, so i would change this to %pip install

@ekzhu
Copy link
Collaborator

ekzhu commented Dec 5, 2024

No worries. Yes please reset changes on those files and apply double quotes again.

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

Successfully merging this pull request may close these issues.

2 participants