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

basic/Tutorial dependencies #179

Open
PeskyPotato opened this issue Sep 16, 2021 · 2 comments
Open

basic/Tutorial dependencies #179

PeskyPotato opened this issue Sep 16, 2021 · 2 comments

Comments

@PeskyPotato
Copy link
Member

The pip command used in the first basic/Tutorial notebook is malformed. See image below.
image

I can submit a PR fixing this, however, I can take the opportunity to improve it a little.

  • Using --upgrade when installing multiple packages together can lead to long install times because of pip backtracking. I stopped it after ~30 minutes.
    • I would suggest talking out --upgrade and using version numbers instead. These are the latest version numbers, and I've tested them in my local environment and SageMaker Notebooks too.
    pip3 install boto3>=1.18.42 pandas>=1.3.3 s3fs>=0.4.2 matplotlib>=3.4.3 ipywidgets>=7.6.5
    
  • Also, it's not advisable to use !pip install <package> in Jupyter notebooks as it might not install packages in the same execution environment used by the notebook. For example, I have to use pip3 instead for this to work.
    • The code snippet below is how you can work around the different execution environments (along with version numbers).
    import sys
    !{sys.executable} -m pip install boto3>=1.18.42 pandas>=1.3.3 s3fs>=0.4.2 matplotlib>=3.4.3 ipywidgets>=7.6.5

I've tested it on my local environment, I'll run it on a SageMaker Notebook too to verify the changes are good. If you're happy with the changes, I can submit a PR. 🙂

@chrisking
Copy link
Contributor

Good catches, if validate the functionality in SM it will definitely be merged in. That's the default assumption for an environment given the educational use of these notebooks in labs and workshops.

Thanks!

@PeskyPotato
Copy link
Member Author

Hi Chris, SageMaker notebooks use conda for package management, I don't see a pip offering.

The conda_python3 environment on SM Notebooks has everything needed already installed, just verified this by running everything again. Perhaps we can remove that cell or mention packages needed in a markdown cell?

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

2 participants