Mido installation fails

Hi

I downloaded the mido package mido-1.3.0.tar.gz, but the installation process failed. It seems to need an Internet connection and that’s impossible with my gapped PC. The version of Python I’m running is 3.11.1, but I also found a version 3.8.1 installation that came with BespokeSynth. They are in totally different folders.

Here is the info I got :

py -m pip install “C:.…\mido-1.3.0.tar.gz”

Processing c:\...\mido-1.3.0.tar.gz
 Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002220452A310>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002220451D810>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002220451D790>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002220451D750>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002220452B090>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      ERROR: Could not find a version that satisfies the requirement setuptools>=61.0.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=61.0.0
      WARNING: There was an error checking the latest version of pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: There was an error checking the latest version of pip.

I’m new to Python and I don’t know how to solve this and ask your kind help.

I would suggest you ask the developer of mido for help if there is no documentation on support versions of python.

It looks like pip can’t reach the internet to download a build dependency. Are you behind a firewall or a proxy?

The package needs to be installed on a gapped desktop PC. That means there is no Internet connection possible.

As advised I’ve also created an Issue on the mido website : Installation errors · Issue #543 · mido/mido · GitHub

Then you need to also download all the dependencies and put them on your PC. You can do this with pip download on a computer which can access the internet, then move the downloaded files to your gapped PC.

Your problem is not an issue with mido. It’s an issue with trying to run a network-based installation on a computer without network access.

Can you please tell me what the dependencies are? I’m finding it difficult to understand this error report.

I don’t know what the dependencies are. setuptools is one, but there may be more. Those dependencies may in turn have more dependencies, which you will also need to download. pip download will handle this for you.

See the pip documentation:

pip download does the same resolution and downloading as pip install, but instead of installing the dependencies, it collects the downloaded distributions into the directory provided (defaulting to the current directory). This directory can later be passed as the value to pip install --find-links to facilitate offline or locked down package installation.

1 Like

Thanks for all the advise. I’ll be away for a few days and will report back next week.

You will likely also need to pass the --no-build-isolation flag to pip. Otherwise it will try to auto-download setuptools for the build instead of using the version you already installed.

In order to install mido I was advised to install pip again.

I discovered that :
• pip is dependent on setuptools
• setuptools is dependent on wheel
• wheel is dependent on flit_core

I installed flit_core-3.9.0.tar.gz succesfully. Then I tried to install wheel, but it gave the same errors :

py -3.11 -m pip install "....\wheel-0.41.2.tar.gz"
Processing ...\wheel-0.41.2.tar.gz
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001BE20D79410>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/flit-core/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001BE2157FAD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/flit-core/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001BE21503390>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/flit-core/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001BE21520C50>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/flit-core/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001BE21571150>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/flit-core/
      ERROR: Could not find a version that satisfies the requirement flit_core<4,>=3.8 (from versions: none)
      ERROR: No matching distribution found for flit_core<4,>=3.8
      WARNING: There was an error checking the latest version of pip.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: There was an error checking the latest version of pip.

Then I tried to install the older version flit_core-3.8.0.tar.gz:, but I get the same errors again.

I don’t understand the meaning of “flit_core<4,>=3.8”.

I’ll add the --no-build-isolation flag in the future.

Using the --no-build-isolation flag wheel, setuptools and pip installed fine. For the installation of the mido package with MIDI port support (python_rtmidi) all advice is still welcome as it seems to be a complex process when a PC is gapped.