Comments (6)
i can confirm i am up and running. The QuPath exension is working fantastically and my cell annotations efficency has sped up! Excited to get going. Thanks for your help @lacan @ksugar
from samapi.
@mezwick thank you for sharing it. It looks like a temporal issue with PyTorch's repository for the whl files.
I confirmed that you had found a workaround using the conda package with openssl.
There would be some other possible workarounds.
- Use another repository for the whl.
python -m pip install torch --find-links https://s3.amazonaws.com/pytorch/whl/torch_stable.html
- Trust the relevant hosts to ignore the HTTPS warnings.
python -m pip install --trusted-host pypi.org --trusted-host pytorch.org --trusted-host download.pytorch.org --trusted-host files.pypi.org --trusted-host files.pytorch.org torch --index-url https://download.pytorch.org/whl/cu118
from samapi.
Hi @mezwick,
From what I find on the web, this is an issue with teh website from Facebook which is not configured properly. Looking around, I cannot find anything obvious... I gotta say I am not experiencing this with Mamba, (conda had issues for us)
Here is what I read, you could try downgrading to OpenSSL 1.1.1 urllib3/urllib3#2653
Or if you use Mamba, then it works on Win10/11
Here is my env just in case
(F:\conda-envs\samapi) C:\Users\oburri>mamba list
# packages in environment at F:\conda-envs\samapi:
#
# Name Version Build Channel
anyio 3.7.0 pypi_0 pypi
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2023.5.7 h56e8100_0 conda-forge
certifi 2023.5.7 pypi_0 pypi
charset-normalizer 3.1.0 pypi_0 pypi
click 8.1.3 pypi_0 pypi
colorama 0.4.6 pypi_0 pypi
dnspython 2.3.0 pypi_0 pypi
email-validator 2.0.0.post2 pypi_0 pypi
fastapi 0.96.1 pypi_0 pypi
filelock 3.9.0 pypi_0 pypi
geojson 3.0.1 pypi_0 pypi
h11 0.14.0 pypi_0 pypi
httpcore 0.17.2 pypi_0 pypi
httptools 0.5.0 pypi_0 pypi
httpx 0.24.1 pypi_0 pypi
idna 3.4 pypi_0 pypi
imageio 2.31.1 pypi_0 pypi
itsdangerous 2.1.2 pypi_0 pypi
jinja2 3.1.2 pypi_0 pypi
lazy-loader 0.2 pypi_0 pypi
libexpat 2.5.0 h63175ca_1 conda-forge
libffi 3.4.2 h8ffe710_5 conda-forge
libsqlite 3.42.0 hcfcfb64_0 conda-forge
libzlib 1.2.13 hcfcfb64_5 conda-forge
markupsafe 2.1.2 pypi_0 pypi
mpmath 1.2.1 pypi_0 pypi
networkx 3.0 pypi_0 pypi
numpy 1.24.3 pypi_0 pypi
openssl 3.1.1 hcfcfb64_1 conda-forge
orjson 3.9.1 pypi_0 pypi
packaging 23.1 pypi_0 pypi
pillow 9.5.0 pypi_0 pypi
pip 23.1.2 pyhd8ed1ab_0 conda-forge
pydantic 1.10.9 pypi_0 pypi
python 3.11.4 h2628c8c_0_cpython conda-forge
python-dotenv 1.0.0 pypi_0 pypi
python-multipart 0.0.6 pypi_0 pypi
pywavelets 1.4.1 pypi_0 pypi
pyyaml 6.0 pypi_0 pypi
requests 2.31.0 pypi_0 pypi
samapi 0.2.0 pypi_0 pypi
scikit-image 0.21.0 pypi_0 pypi
scipy 1.10.1 pypi_0 pypi
segment-anything 1.0 pypi_0 pypi
setuptools 67.7.2 pyhd8ed1ab_0 conda-forge
shapely 2.0.1 pypi_0 pypi
sniffio 1.3.0 pypi_0 pypi
starlette 0.27.0 pypi_0 pypi
sympy 1.11.1 pypi_0 pypi
tifffile 2023.4.12 pypi_0 pypi
tk 8.6.12 h8ffe710_0 conda-forge
torch 2.0.1+cu118 pypi_0 pypi
torchvision 0.15.2 pypi_0 pypi
typing-extensions 4.4.0 pypi_0 pypi
tzdata 2023c h71feb2d_0 conda-forge
ucrt 10.0.22621.0 h57928b3_0 conda-forge
ujson 5.8.0 pypi_0 pypi
urllib3 2.0.3 pypi_0 pypi
uvicorn 0.22.0 pypi_0 pypi
vc 14.3 hb25d44b_16 conda-forge
vc14_runtime 14.34.31931 h5081d32_16 conda-forge
vs2015_runtime 14.34.31931 hed1258a_16 conda-forge
watchfiles 0.19.0 pypi_0 pypi
websockets 11.0.3 pypi_0 pypi
wheel 0.40.0 pyhd8ed1ab_0 conda-forge
xz 5.2.6 h8d14728_0 conda-forge
from samapi.
Hi @mezwick , thank you for reporting the issue.
I had issues downloading .whl file for CUDA via pip
could you share the issues you had with the following command?
python -m pip install torch --index-url https://download.pytorch.org/whl/cu118
Thank you @lacan for sharing it!
@mezwick please try Mamba instead of Conda and let us know if it works.
from samapi.
Thanks for the replies @lacan and @ksugar
For the pip command.
python -m pip install torch --index-url https://download.pytorch.org/whl/cu118
I return the following error.
(samapi2) C:\Users\U062951>python -m pip install torch --index-url https://download.pytorch.org/whl/cu118
Looking in indexes: https://download.pytorch.org/whl/cu118
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))': /whl/cu118/torch/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))': /whl/cu118/torch/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))': /whl/cu118/torch/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))': /whl/cu118/torch/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))': /whl/cu118/torch/
Could not fetch URL https://download.pytorch.org/whl/cu118/torch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu118/torch/ (Caused by SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))) - skipping
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch
Could not fetch URL https://download.pytorch.org/whl/cu118/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu118/pip/ (Caused by SSLError(SSLError(1, '[SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1002)'))) - skipping
I work at a company where firewalls may be linked to this error. If i try to manually download .whl files, they do not download (i just get a blank file). Installing via conda seems to work though, hence why i went with a conda install
from samapi.
Downgrading to openssl=1.1.1 seems to have worked. Or at least i seem to now be able to download the fbaipublicfiles and run the server!
(samapi) C:\Users>uvicorn samapi.main:app
Downloading: "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth" to C:\Users\U062951/.cache\torch\hub\checkpoints\sam_vit_h_4b8939.pth
100.0%
Downloading: "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth" to C:\Users\U062951/.cache\torch\hub\checkpoints\sam_vit_l_0b3195.pth
100.0%
Downloading: "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth" to C:\Users\U062951/.cache\torch\hub\checkpoints\sam_vit_b_01ec64.pth
100.0%
�[32mINFO�[0m: Started server process [�[36m12528�[0m]
�[32mINFO�[0m: Waiting for application startup.
�[32mINFO�[0m: Application startup complete.
�[32mINFO�[0m: Uvicorn running on �[1mhttp://127.0.0.1:8000�[0m (Press CTRL+C to quit)
Key command....
conda install openssl=1.1.1 -c conda-forge
from samapi.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samapi.