doubt About import machine

Joe Pfeiffer pfeiffer at cs.nmsu.edu
Sun Nov 21 17:34:10 EST 2021


Daniel Eduardo Almeida Correa <danialmeidac at gmail.com> writes:

> Hello, I'm trying to use the machine library in python 3.10 version, but I
> can't import it with the pip install machine, could you tell me a way to
> solve it  or a python version compatible with the library? Thank you a lot
> for your answer.

The "machine" package on pypi appears to only be an example of best
practices for a python package, and doesn't actually contain anything
useful.  Installing it doesn't actually give you a package called
"machine" that you can import; it lets you import something called
"sample" instead, which contains

def main():
    """Entry point for the application script"""
    print("Call your main application code here")

as its __init__()

I'll note that I'm sort of a beginner with python so I may be speaking
out of turn, but it strikes me as really unlikely that the "best
practice" for a package named "machine" would put its code in a
directory named "sample".

Following the home page link for the project leads to a 404 on github


More information about the Python-list mailing list