Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2022 17:41:30 +0100
From:      Tomek CEDRO <tomek@cedro.info>
To:        Mario Marietto <marietto2008@gmail.com>
Cc:        ports@freebsd.org
Subject:   =?UTF-8?Q?Re=3A_The_installation_of_=E2=80=9CStable_Diffusion_web_UI?= =?UTF-8?Q?=E2=80=9D_natively_on_FreeBSD_fails_because_can=E2=80=99t_install_torch_?= =?UTF-8?Q?and_torchvision?=
Message-ID:  <CAFYkXjmzrLr2x-DKx%2BY88191fOVQ0EL6rtHiSGP4QMV4VRe=sA@mail.gmail.com>
In-Reply-To: <CAFYkXjn2deM--tyU9Mpi-%2BiM0ALyePhEDGt9LRY0QW8gJ-3Smg@mail.gmail.com>
References:  <CA%2B1FSihJdXHeHL1pUD3SB6vujhG0M1-9wAqeFwjCS8r4syu7mQ@mail.gmail.com> <CA%2B1FSijaF-W8PJo9GtK0S-4BFtSBhD6FjbPu-ZJLBwQ%2Bcymoew@mail.gmail.com> <CAFYkXjn2deM--tyU9Mpi-%2BiM0ALyePhEDGt9LRY0QW8gJ-3Smg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 19, 2022 at 5:32 PM Tomek CEDRO  wrote:
> (venv3.9embedded) pip install torchvision==
> ERROR: Could not find a version that satisfies the requirement
> torchvision== (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0,
> 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3)
> ERROR: No matching distribution found for torchvision==
>
> Using `==` as the package suffix to the package name will list all
> available versions.
>
> It seems that package for torch is not avilable for pip, while there
> are torchvision packages available in versions: 0.1.6, 0.1.7, 0.1.8,
> 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3 (not the
> 0.13.1+cu113 that you need).
>
> Because both torch and torchvision are not available for download (and
> in version that you need) I would clone the source code repo and build
> it + install from that repo (being inside venv of course).
>
> Please note that most folks unfortunately does not provide precompiled
> binary modules for FreeBSD, so you will have to build them from the
> sources (it will be done by pip when no binary package is available).
> Also some packages may not build correctly out of the box on FreeBSD
> and you will have to clone that specific repo, find a fix, then
> provide a fix to the upstream.
>
> This also may be a good time to mention public pip availability of the
> packages to the upstream :-)

If you look at https://download.pytorch.org/whl/cu113

Then you will see:
1. https://download.pytorch.org/whl/torch/
2. https://download.pytorch.org/whl/torchvision/

..and none of them contains pre-built binaries for FreeBSD (or any
other BSD) just for win linux and mac.. this is standard
unfortunately.

If the upstream provided at least source releases on pypi they would
have been available to download and local build by pip on any OS.

Right now you need to clone project repositories, checkout selected
version (or stay with master if that works), and build + install from
the cloned repo using venv.

Please remember to check with `which python3` if you are inside python
venv. Otherwise you would use system level python and system level
python packages / modules which is not desired to be modified by user.
Make sure you are building and installing local packages indise local
venv.

Good luck and Have fun! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFYkXjmzrLr2x-DKx%2BY88191fOVQ0EL6rtHiSGP4QMV4VRe=sA>