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

Use %pip install instead of !pip install in the notebooks #30

Open
simonw opened this issue Aug 29, 2024 · 0 comments
Open

Use %pip install instead of !pip install in the notebooks #30

simonw opened this issue Aug 29, 2024 · 0 comments

Comments

@simonw
Copy link
Contributor

simonw commented Aug 29, 2024

I was following this notebook: https://github.com/anthropics/courses/blob/cf2979dc88626f15c760ce83bc9e9e21015fcac5/prompt_engineering_interactive_tutorial/Anthropic%201P/00_Tutorial_How-To.ipynb

I cloned the repo and started the notebook like this, which was delightfully fast:

uv run jupyter-notebook .

But I got an error trying to import anthropic. It turns out this was because I was running Jupyter from a different environment, so this line:

!pip install anthropic

Installed the package into my default system environment, not the one for the notebook.

The fix is to use this instead:

%pip install anthropic

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

1 participant