Как мне установить Auto-PyTorch на Windows 10 из файла requirements.txt? - PullRequest
1 голос
/ 09 июля 2020

Я пытался установить Auto-PyTorch, автоматическую c систему настройки нейронной сети (подробнее об установке здесь: https://github.com/automl/Auto-PyTorch) в системе Windows 10. Шаги установки следующие:

$ cd install/path
$ git clone https://github.com/automl/Auto-PyTorch.git
$ cd Auto-PyTorch
$ cat requirements.txt | xargs -n 1 -L 1 pip install
$ python setup.py install

Однако я не могу обойти следующую строку кода:

cat requirements.txt | xargs -n 1 -L 1 pip install

Как только я доберусь туда, следующее Windows PowerShell возникает ошибка:

xargs : The term 'xargs' is not recognized as the name of a cmdlet, function, script file, or 

operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:86
+ ... read.CurrentUICulture = 'en-US'; cat requirements.txt | xargs -n 1 -L ...
+                                                             ~~~~~
    + CategoryInfo          : ObjectNotFound: (xargs:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Обратите внимание, что я передал следующую строку кода, поэтому ошибка выдается на английском языке sh (я испанец sh):

[Threading.Thread]::CurrentThread.CurrentUICulture = 'en-US'; cat requirements.txt | xargs -n 1 -L 1 pip install

Я не эксперт по PowerShell, поэтому буду очень признателен за вашу помощь.

С уважением!

1 Ответ

1 голос
/ 09 июля 2020

Поскольку вы работаете на Windows PowerShell , можно предположить, что доступны только служебные программы командной строки на Windows и xargs, утилита Unix, среди них , а не . (Хотя git также не доступен изначально, похоже, вы его уже установили).

Вот перевод вашего кода в собственный код PowerShell (обратите внимание, что cd является встроенным псевдоним для Set-Location, а только на Windows cat - встроенный псевдоним для Get-Content; % - встроенный псевдоним для ForEach-Object командлет):

Set-Location install/path
git clone https://github.com/automl/Auto-PyTorch.git
Set-Location Auto-PyTorch
Get-Content requirements.txt | % { pip install $_ }
python setup.py install
...