Skip to content

Version 2.58.0 Does Not Specify psutil as a Dependency #2611

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

Closed
parsons-kyle-89 opened this issue Aug 31, 2021 · 3 comments
Closed

Version 2.58.0 Does Not Specify psutil as a Dependency #2611

parsons-kyle-89 opened this issue Aug 31, 2021 · 3 comments

Comments

@parsons-kyle-89
Copy link

Describe the bug
In version 2.58.0 import sagemaker will fail if you don't also install psutil which will not be installed by python -m pip install 'sagemaker==2.58.0'

To reproduce
Create venv, install sagemaker, and try to import it.

$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install sagemaker==2.58.0
$ python -c "import sagemaker"
...
ModuleNotFoundError: No module named 'psutil'

Expected behavior
Sagemaker should import without error.

Screenshots or logs

$ python -c "import sagemaker"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/__init__.py", line 18, in <module>
    from sagemaker import estimator, parameter, tuner  # noqa: F401
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/estimator.py", line 28, in <module>
    from sagemaker import git_utils, image_uris
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/image_uris.py", line 22, in <module>
    from sagemaker.spark import defaults
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/spark/__init__.py", line 16, in <module>
    from sagemaker.spark.processing import PySparkProcessor, SparkJarProcessor  # noqa: F401
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/spark/processing.py", line 35, in <module>
    from sagemaker.local.image import _ecr_login_if_needed, _pull_image
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/local/__init__.py", line 16, in <module>
    from .local_session import (  # noqa: F401
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/local/local_session.py", line 23, in <module>
    from sagemaker.local.image import _SageMakerContainer
  File "~/code/sagemaker/.venv/lib/python3.7/site-packages/sagemaker/local/image.py", line 37, in <module>
    import psutil
ModuleNotFoundError: No module named 'psutil'

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.58.0
  • Python version: 3.7.3
  • Custom Docker image (Y/N): N

Additional context
Appears caused by #2572 . psutil is added as a local requirement and then by extension a test requirement but not as a base requirement.

@ahsan-z-khan
Copy link
Member

@parsons-kyle-89 ,

Hi Thanks for using Amazon SageMaker.

Looking into the issue now.

shreyapandit pushed a commit that referenced this issue Sep 1, 2021
* update required packages

* revert #2572

* remove psutil
@shreyapandit
Copy link
Contributor

This fix is on it's way to release.

@ahsan-z-khan
Copy link
Member

Fix is released

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

No branches or pull requests

3 participants