ChenglongMa / SkinToneClassifier

An easy-to-use library for skin tone classification
https://chenglongma.com/SkinToneClassifier/
GNU General Public License v3.0
97 stars 13 forks source link

Not able to use stone command #3

Closed vittoria-thomasini closed 1 year ago

vittoria-thomasini commented 1 year ago

I'm trying to test the library, but following the read.me steps I was unable to use the command stone. Am I missing something? When I run the installation again, that cmd returns:

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: skin-tone-classifier in c:\users\appdata\roaming\python\python39\site-packages (0.2.1)
Requirement already satisfied: opencv-python>=4.6.0.66 in c:\users\appdata\roaming\python\python39\site-packages (from skin-tone-classifier) (4.8.0.74)
Requirement already satisfied: numpy>=1.21.5 in c:\users\appdata\roaming\python\python39\site-packages (from skin-tone-classifier) (1.24.3)
Requirement already satisfied: colormath>=3.0.0 in c:\users\appdata\roaming\python\python39\site-packages (from skin-tone-classifier) (3.0.0)
Requirement already satisfied: tqdm>=4.64.0 in c:\users\appdata\roaming\python\python39\site-packages (from skin-tone-classifier) (4.65.0)
Requirement already satisfied: networkx>=2.0 in c:\users\appdata\roaming\python\python39\site-packages (from colormath>=3.0.0->skin-tone-classifier) (3.1)
Requirement already satisfied: colorama in c:\users\\appdata\roaming\python\python39\site-packages (from tqdm>=4.64.0->skin-tone-classifier) (0.4.6)

I'm using python 3.9.13 and pip 23.1.2. Windows 11. Also, when I try to use the stone command, and this not exist.

ChenglongMa commented 1 year ago

Hi @vittoria-thomasini,

Thanks for your feedback. I have noticed this bug, and I will fix it soon. If you don't mind, you can clone the source code to your local device and run:

python ./path/to/SkinToneClassifier/src/stone/__main__.py -i ...<other parameters>

I will let you know once I fix the bug.

Thanks!

ChenglongMa commented 1 year ago

Hi @vittoria-thomasini,

I tested the installation steps in some different sandboxes, but they did not pop up the error message.

According to your cmd message, the first line Defaulting to user installation because normal site-packages is not writeable says SkinToneClassifier cannot be installed in the default site-packages. Instead, it was installed in c:\users\appdata\roaming\python\python39\site-packages.

Well, it can cause the error that stone cannot be found, because c:\users\appdata\roaming\python\python39\site-packages may not be in the system PATH.

So, please do the following steps to fix it:

  1. Open c:\users\appdata\roaming\python\python39\site-packages and check if there is a file named stone.exe;
  2. If so, please add c:\users\appdata\roaming\python\python39\site-packages to your system environment path; You can refer to this link to add it: https://stackoverflow.com/a/69912527/8860079. Just change their path to c:\users\appdata\roaming\python\python39\site-packages;
  3. If there is no such file or you don't want to touch the environment variable, you can run pip install... command with administrative privileges.

Hope this can help you. Thanks.

XiaoWen1227 commented 1 year ago

Hey @ChenglongMa,

I have the same issue, i successfully installed it, but I still unable to use the "stone" command, anything i did wrong?

Requirement already satisfied: skin-tone-classifier in c:\users\stude\anaconda3\lib\site-packages (0.2.2) Requirement already satisfied: opencv-python>=4.6.0.66 in c:\users\stude\anaconda3\lib\site-packages (from skin-tone-classifier) (4.8.0.74) Requirement already satisfied: numpy>=1.21.5 in c:\users\stude\anaconda3\lib\site-packages (from skin-tone-classifier) (1.21.5) Requirement already satisfied: colormath>=3.0.0 in c:\users\stude\anaconda3\lib\site-packages (from skin-tone-classifier) (3.0.0) Requirement already satisfied: tqdm>=4.64.0 in c:\users\stude\anaconda3\lib\site-packages (from skin-tone-classifier) (4.64.1) Requirement already satisfied: networkx>=2.0 in c:\users\stude\anaconda3\lib\site-packages (from colormath>=3.0.0->skin-tone-classifier) (2.8.4) Requirement already satisfied: colorama in c:\users\stude\anaconda3\lib\site-packages (from tqdm>=4.64.0->skin-tone-classifier) (0.4.6)

appreciated for help

ChenglongMa commented 1 year ago

Hi @XiaoWen1227,

Thanks for your feedback!

I repeated the installation step in a new environment but did not reproduce the same error.

According to the message, you seem to have installed the library in the base environment of anaconda.

Please do the following checks to verify the installation:

  1. Please ensure you entered the base environment before running the stone command;
  2. Please check whether there is a stone.exe file located in C:\Users\stude\anaconda3\Scripts;
  3. Please run the stone command in Anaconda Powershell Prompt rather than Anaconda Prompt;

Please let me know if you have any updates after the above steps.

Thanks!

ChenglongMa commented 1 year ago

With no more responses, close the issue for now. We'll be happy to reopen the issue when more information is provided.