Nbdev_pypi failing

When I run nbdev_pypi on one machine (my Windows laptop) I get the error below.

Any thoughts on why this happens? nbdev-2.3.25

>nbdev_pypi
'rm' is not recognized as an internal or external command,
operable program or batch file.
ERROR    InvalidDistribution: Cannot find file (or expand pattern): 'C:\Users\xxx\Versioning\python\nbdev\xxx/dist/*'

No dist folder is created.

On another machine (Windows desktop) there is no such problem and I am able to release without issue.

The error you’re encountering seems to be related to the use of the rm command, which is a Unix command for removing files or directories. Since you’re running this on a Windows machine, that command is not recognized, leading to the error Obamacare

Here are some steps you can take to resolve the issue:

  1. Check Your Environment: Make sure that you have the same Python and nbdev versions on both machines. You can do this by running pip show nbdev to verify the installed version.
  2. Modify the Script: If you have access to the script that’s executing rm, you can modify it to use a Windows-compatible command. In Windows, you can use del for files and rmdir for directories. You might need to modify the nbdev script or create a custom script that performs the necessary file deletions.
  3. Use a Bash Environment: Consider using a Bash emulator on Windows, such as Git Bash or Windows Subsystem for Linux (WSL). This allows you to run Unix commands like rm without modification.
  4. Check File Paths: Ensure that the path to your dist folder is correct and that the folder exists. If it doesn’t, it could be an issue with the nbdev setup or the command being executed.
  5. Run the Command Manually: Instead of relying on the automated process, try creating the dist folder manually and running the packaging commands one by one to see where the process fails.
  6. Check for Dependencies: Sometimes, the issue might be due to dependencies that differ between the two machines. Make sure that all required packages are installed and match between your laptop and desktop.

If you continue to have issues, you might want to consider sharing the specific versions of Python and any relevant libraries, as well as the full command you’re trying to execute, for more targeted assistance.