Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
themeFadeToGrey
(venv) C:\Python Bridge>

Installing Python Bridge Dependencies (Old Way)

Once in the virtual environment proceed to install the Python Bridge dependencies, all the dependencies should be listed in a file called requirements.txt inside the Python Bridge folder. Install the dependencies by executing the following command:

...

Tip

You may see a trusted or SSL certificate error message when trying to install dependencies.  This because some of the hosts are not trusted by the pip tool.

Try with the next command: 

pip install --trusted-host download.pytorch.org -r requirements.txt

If this doesn't work either you can tell pip to trust those hosts by adding them to a text file called "pip.ini" which you place in the "venv" folder. 

And then, try running the following command:

pip config set global.trusted-host "pypi.org files.pythonhosted.org download.pytorch.org"



Installing Python Bridge Dependencies (New Way)

We have now a pyproject.toml file, so we can install libraries from there instead of using the requirements.txt. This method has multiple advantages, such as: optional dependencies, easy control over all the installed libraries, addition of advanced setup configurations and more.

To install the dependencies using this new method, you need to use: 

Code Block
languagetext
themeFadeToGrey
pip install -e .

This will install all the required dependencies needed to start the server without any model.

To install extra optional dependencies, you can use this other command:

Code Block
languagetext
themeFadeToGrey
pip install -e .[all]

Where [all] is the name of the optional dependencies to install. They need to be added to the correct section on the pyproject file.

If you do not kwno how to do this, here is a page with all you need to know about the pyproject file and its optional dependencies.


Info

This process may take a few minutes, since pip needs to download and install every dependency



Start Python Bridge Server

...