0
votes

I'll note up front that I've seen the related thread, and I've tried installing everything recommended: setuptools, wheel, egg, but I'm still getting the same error.

I'm running into the error while trying to install Picard:

C:\>pip install picard
Collecting picard
  Using cached https://files.pythonhosted.org/packages/e8/ec/e76d4a84d37e6bd93789bf8f7a15f9e63f94cbc8b79607a2152b3fcc313f/picard-2.1.tar.gz
Requirement already satisfied: PyQt5 in c:\program files\python37\lib\site-packages (from picard) (5.12.2)
Requirement already satisfied: mutagen in c:\program files\python37\lib\site-packages (from picard) (1.42.0)
Requirement already satisfied: PyQt5_sip<13,>=4.19.14 in c:\program files\python37\lib\site-packages (from PyQt5->picard) (4.19.17)
Building wheels for collected packages: picard
  Building wheel for picard (setup.py) ... error
  ERROR: Complete output from command 'c:\program files\python37\python.exe' -u-c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\bdb484\\AppData\\Local\\Temp\\pip-install-lc47_c7l\\picard\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\bdb484\AppData\Local\Temp\pip-wheel-7ktnx238' --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  generating scripts/picard from scripts/picard.in
  error: [Errno 2] No such file or directory: 'installer/picard-setup.nsi.in'
  ----------------------------------------
  ERROR: Failed building wheel for picard
  Running setup.py clean for picard
Failed to build picard
Installing collected packages: picard
  Running setup.py install for picard ... error
    ERROR: Complete output from command 'c:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\bdb484\\AppData\\Local\\Temp\\pip-install-lc47_c7l\\picard\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\bdb484\AppData\Local\Temp\pip-record-wwek3m3r\install-record.txt' --single-version-externally-managed --compile:
    ERROR: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --single-version-externally-managed not recognized
    ----------------------------------------
ERROR: Command "'c:\program files\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\bdb484\\AppData\\Local\\Temp\\pip-install-lc47_c7l\\picard\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\bdb484\AppData\Local\Temp\pip-record-wwek3m3r\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\bdb484\AppData\Local\Temp\pip-install-lc47_c7l\picard\

I've been googling around for a while without luck.

Any ideas?

2

2 Answers

2
votes

The problem is that the windows-specific part of setup.py at https://github.com/metabrainz/picard/blob/d141f019c2b88ab6a3a21c04110dad0522e36616/setup.py#L225-L236, in particular

generate_file('installer/picard-setup.nsi.in', 'installer/picard-setup.nsi', args)

tries to generate installer/picard-setup.nsi from installer/picard-setup.nsi.in. However, the source tarball on PyPI doesn't even include the installer directory:

↪ tar tf picard-2.1.tar.gz | grep installer
↪

We've worked on the source distributions a bit last year (https://tickets.metabrainz.org/browse/PICARD-1373), but so far have only tested them on Linux.

If you want to use Picard on Windows, use the installer from https://picard.musicbrainz.org/downloads/.

1
votes

error: [Errno 2] No such file or directory: 'installer/picard-setup.nsi.in'

This is a bug in the setup.py: it tries to generate a file without creating the directory installer first. Please report the bug to the authors. Try to install from the repository:

pip install git+https://github.com/metabrainz/picard.git#egg=picard

error: option --single-version-externally-managed not recognized

This is an option for python setup.py install. Try to run python setup.py install --help with any setup.py and see if it has

--single-version-externally-managed  used by system package builders to
                                     create 'flat' eggs

near the end.