Using Pip to install sleep library

Hello,
I am trying to create a simple program that can send a message via iMessage from my laptop. I am having some issues with importing the ‘sleep’ library (using import sleep). The error message reads:

Collecting sleep

ERROR: Could not find a version that satisfies the requirement sleep (from versions: none)
ERROR: No matching distribution found for sleep
WARNING: You are using pip version 19.2.3, however version 20.3.3 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

Going off of the recommendation to upgrade pip, I tried doing so, only to realize that I might be using the “wrong” pip. When I type: pip --version in command line, I get this:

pip 20.3.3 from /opt/anaconda3/lib/python3.7/site-packages/pip (python 3.7)

I suspect that anaconda, which I used for a class last year, is somehow interfering with the pip used on my project, but I am super lost on how to navigate between the two.

Please help!
Thanks- Thomas

Edit: What library or function are you trying to import? You can view the built-in modules at the following-

Are you looking for time.sleep instead?

*Original (where I assumed you were trying to use a 3rd party package):

I think the first issue is that’s not a known package for pip, Search results · PyPI hence the warning about versions:none.

Make sure you know exactly what package you’re after first, assuming it’s part of the standard package index. Does python -m pip -V point to the same pip? If not then you really want to fix up your path.

Work out what you want to do with anaconda. Does it need to be installed? If you want to keep it but it’s interfering with your current python distribution consider removing it from your PATH ( a web search will help you with this). Getting comfortable with your shell and environment variables is very helpful when working with multiple python versions and avoiding messing with system Python (even if you use neat tools like pyenv).

I’d highly suggest learning how to work with virtual environments which cut down on issues like this (it sounds fancy but it’s fairly straightforward). Have a web search if you need to get your head around the idea or check the links below-