citation-file-format / cffconvert

Command line program to validate and convert CITATION.cff files.
Apache License 2.0
100 stars 28 forks source link

Install instructions do not work on Windows #291

Closed lrq3000 closed 1 year ago

lrq3000 commented 1 year ago

On Windows, trying to install in the userspace will not allow the script entry point to be registered somehow (ie, can't call cffconvert).

The issue is compounded by the fact that then the user must pip uninstall cffconvert then pip install cffconvert to force registering the script entry point.

Proposed solutions:

Either implement a way to call cffconvert as a module using python -m cffconvert, or update README instructions to recommend pip install cffconvert for Windows users.

jspaaks commented 1 year ago

Hi @lrq3000 and thanks for reporting!

I suspect something might be going wrong with the PATH environment variable.

Could you verify that you have a cffconvert executable in C:\Users\lrq3000\AppData\Roaming\Python\Python38\Scripts (insert actual user name and python version). If you have it, try calling it with the full path. If that works, your problem can likely be solved by adding the Scripts directory to the PATH environment variable as follows.

set PATH=C:\Users\lrq3000\AppData\Roaming\Python\Python38\Scripts;%PATH%

Let me know if that works.

Best regards, Jurriaan

lrq3000 commented 1 year ago

@jspaaks You are correct, this path (but with Python310) was not in my PATH environment variable. And I don't know why. I installed Anaconda3 in my userspace, but only the path to packages inside my Python install is in my PATH:

C:\Users\username\anaconda3\Scripts

So I don't know if this issue happens for everyone with a Windows machine installing Anaconda3, but I suspect so, as my install is quite fresh (only a few months old and mostly unused/clean of 3rd-party packages).