Gregory
Gregory

Reputation: 195

trying to install label-studio with Python

I'm trying to install label-studio library following the web-site information: enter link description here

In particular I'm using the following commands:

pip install label-studio --user

The module is correctly installed in the folder: c:\users*******\appdata\roaming\python\python311\site-packages.

But I get the following error when I run the command label-studio start:

label-studio : The term 'label-studio' 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:1
+ label-studio
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (label-studio:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Or if I run python -m label-studio, I get this error:

C:\Python311\python.exe: No module named label-studio

I also tried with the following installation method:

python3 -m venv c:\path\to\myenv
c:\path\to\myenv\Scripts\activate.bat
python -m pip install label-studio --user

But when I run the command label-studio I get the same error.

Finally if I use the following commands:

python3 -m venv env
source env/bin/activate
python -m pip install label-studio

I get the following error in the source env/bin/activate command:

source : The term 'source' 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 wa
s included, verify that the path is correct and try again.
At line:1 char:1
+ source env/bin/activate
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (source:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Do you know what could be the problem?

Upvotes: 1

Views: 1087

Answers (1)

Zalak Bhalani
Zalak Bhalani

Reputation: 1144

It is better practice to install python libraries in virtual environment.

First create virtual environment using

python -m venv <ENV_NAME>

For activating use following command

<ENV_NAME>\Scripts\activate

Install label-studio with

pip install label-studio

and finally start the label-studio using following command

label-studio

Upvotes: 2

Related Questions