• =?UTF-8?B?UmU6IE5vIG1vZHVsZSBuYW1lZCAncGxheXNvdW5kJ+KAj+KAj+KAjw==?= =?

    From MRAB@21:1/5 to om om on Mon Jan 9 15:25:50 2023
    On 2023-01-09 14:40, om om wrote:
    I'm installing playsound pip install playsound
    but it keeps saying No module named playsound
    and this error occurs on other packages

    What are you typing on the command line? Which operating system are you
    using?

    Please copy and post what you're typing (with the command prompt) and
    the complete error message.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to om om on Mon Jan 9 10:30:33 2023
    On 1/9/2023 9:40 AM, om om wrote:
    I'm installing playsound pip install playsound
    but it keeps saying No module named playsound
    and this error occurs on other packages

    Did the installation by pip succeed? if not, what was the error message?

    "It keeps saying ...". What keeps saying that (it's not a standard error message from pip)? What is the code or command that causes this error
    message?

    You would get such a message if you tried to import a package but it had
    not been installed. If you used pip to install a package and it
    succeeded but you could not import the package (or module), the most
    likely reason is that it got installed by a different version of python
    than the one that used pip to install it. You may have several
    different versions of Python on your computer.

    You can check versions by running

    pip -V

    Then use the command you normally use to run Python (i.e., python3, py,
    etc.) and run

    py_x -m pip -V

    (don't type "py_x", use the command name you normally use to run python)

    If the two outputs are different, then you will know for sure that your packages got installed to a different version of Python. Re-install
    them using "python -m pip install" instead of "pip install" - again,
    make sure that you use the actual name for the python command that you
    normally use.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mats Wichmann@21:1/5 to Thomas Passin on Mon Jan 9 09:59:09 2023
    On 1/9/23 08:30, Thomas Passin wrote:
    On 1/9/2023 9:40 AM, om om wrote:
    I'm installing playsound pip install playsound
    but it keeps saying No module named playsound
    and this error occurs on other packages

    Did the installation by pip succeed? if not, what was the error message?

    "It keeps saying ...". What keeps saying that (it's not a standard error message from pip)? What is the code or command that causes this error message?

    You would get such a message if you tried to import a package but it had
    not been installed.  If you used pip to install a package and it
    succeeded but you could not import the package (or module), the most
    likely reason is that it got installed by a different version of python
    than the one that used pip to install it.  You may have several
    different versions of Python on your computer.

    You can check versions by running

    pip -V

    As described in this reply, but to be more explicit: if a package
    installed wtihout error, and then you can't import it in Python, it's basically always a path problem.

    Invoking pip the same way as you did to install, do:

    pip show playsound

    This will tell you where it put it. If that's not a place your Python is looking, it won't find it.


    Then use the command you normally use to run Python (i.e., python3, py, etc.) and run

    py_x -m pip -V

    (don't type "py_x", use the command name you normally use to run python)

    If the two outputs are different, then you will know for sure that your packages got installed to a different version of Python.  Re-install
    them using "python -m pip install" instead of "pip install" - again,
    make sure that you use the actual name for the python command that you normally use.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From MRAB@21:1/5 to Thomas Passin on Mon Jan 9 19:10:28 2023
    On 2023-01-09 17:11, Thomas Passin wrote:

    I wrote

    "the most likely reason is that it got installed by a different
    version of python than the one that used pip to install it."

    That's not quite what I meant to say. Better:

    "the most likely reason is that you are trying to import it using a
    different version of python than the one that used pip to install it."

    On Windows it's best to use pip via the Python Launcher:

    py -m pip show playsound


    On 1/9/2023 11:59 AM, Mats Wichmann wrote:
    On 1/9/23 08:30, Thomas Passin wrote:
    On 1/9/2023 9:40 AM, om om wrote:
    I'm installing playsound pip install playsound
    but it keeps saying No module named playsound
    and this error occurs on other packages

    Did the installation by pip succeed? if not, what was the error message? >>>
    "It keeps saying ...". What keeps saying that (it's not a standard
    error message from pip)? What is the code or command that causes this
    error message?

    You would get such a message if you tried to import a package but it
    had not been installed.  If you used pip to install a package and it
    succeeded but you could not import the package (or module), the most
    likely reason is that it got installed by a different version of
    python than the one that used pip to install it.  You may have several
    different versions of Python on your computer.

    You can check versions by running

    pip -V

    As described in this reply, but to be more explicit: if a package
    installed wtihout error, and then you can't import it in Python, it's
    basically always a path problem.

    Invoking pip the same way as you did to install, do:

    pip show playsound

    This will tell you where it put it. If that's not a place your Python is
    looking, it won't find it.


    Then use the command you normally use to run Python (i.e., python3,
    py, etc.) and run

    py_x -m pip -V

    (don't type "py_x", use the command name you normally use to run python) >>>
    If the two outputs are different, then you will know for sure that
    your packages got installed to a different version of Python.
    Re-install them using "python -m pip install" instead of "pip install"
    - again, make sure that you use the actual name for the python command
    that you normally use.




    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Mats Wichmann on Mon Jan 9 12:11:29 2023
    I wrote

    "the most likely reason is that it got installed by a different
    version of python than the one that used pip to install it."

    That's not quite what I meant to say. Better:

    "the most likely reason is that you are trying to import it using a
    different version of python than the one that used pip to install it."


    On 1/9/2023 11:59 AM, Mats Wichmann wrote:
    On 1/9/23 08:30, Thomas Passin wrote:
    On 1/9/2023 9:40 AM, om om wrote:
    I'm installing playsound pip install playsound
    but it keeps saying No module named playsound
    and this error occurs on other packages

    Did the installation by pip succeed? if not, what was the error message?

    "It keeps saying ...". What keeps saying that (it's not a standard
    error message from pip)? What is the code or command that causes this
    error message?

    You would get such a message if you tried to import a package but it
    had not been installed.  If you used pip to install a package and it
    succeeded but you could not import the package (or module), the most
    likely reason is that it got installed by a different version of
    python than the one that used pip to install it.  You may have several
    different versions of Python on your computer.

    You can check versions by running

    pip -V

    As described in this reply, but to be more explicit: if a package
    installed wtihout error, and then you can't import it in Python, it's basically always a path problem.

    Invoking pip the same way as you did to install, do:

    pip show playsound

    This will tell you where it put it. If that's not a place your Python is looking, it won't find it.


    Then use the command you normally use to run Python (i.e., python3,
    py, etc.) and run

    py_x -m pip -V

    (don't type "py_x", use the command name you normally use to run python)

    If the two outputs are different, then you will know for sure that
    your packages got installed to a different version of Python.
    Re-install them using "python -m pip install" instead of "pip install"
    - again, make sure that you use the actual name for the python command
    that you normally use.



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to MRAB on Mon Jan 9 16:21:45 2023
    On 1/9/2023 2:10 PM, MRAB wrote:
    On Windows it's best to use pip via the Python Launcher:

    py -m pip show playsound

    Sure - I just didn't want to complicate the post any more, though I did
    mention it in passing. py is definitely the best way. I wonder how
    many people know that py can launch other versions of Python too?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Eryk Sun on Mon Jan 9 16:23:37 2023
    On 1/9/2023 3:00 PM, Eryk Sun wrote:
    On 1/9/23, MRAB <python@mrabarnett.plus.com> wrote:

    On Windows it's best to use pip via the Python Launcher:

    py -m pip show playsound

    Python's app distribution on the Microsoft Store doesn't include the
    py launcher, and we don't (but should) have a standalone app or
    desktop version of the launcher. Unlike the desktop distribution,
    however, the app distribution installs a versioned name as a link,
    such as "python3.11". (Note that a venv virtual environment only has a "python" command on Windows.)

    If "pip" is in PATH, a versioned name such as "pip3.11" should also be available. If multiple versions of the app distribution are installed,
    and for some reason the "python" and "pip" links are mapped to
    different versions, one can match up the versioned names "pip3.11" and "python3.11" to ensure consistency. Or simply run "python -m pip".

    It better be "pythonx.xx -m pip", though!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)