59π
Update: this issue was fixed in PyTorch 2.1.1.
Since May 9 2023 there is an open issue with PyTorch 2.0.1 and 2.1.0 causing poetry lock
to delete libcublas from poetry.lock
. Their wheel contains the dependency, but their PyPi upload did not get it.
A workaround would be to skip these versions in pyproject.toml (typically under [tool.poetry.dependencies]
):
torch = ">=2.0.0, !=2.0.1, !=2.1.0"
Make sure to run the following to correctly update your poetry env after making the change
poetry lock --no-update
poetry install
2π
You have to install cuda on your system.
E.g. on ubuntu:
sudo apt-get install nvidia-cuda-toolkit nvidia-cuda-toolkit-gcc
- [Django]-Invalid command WSGIDaemonProcess Deploy Django application on CentOS 6.7
- [Django]-Running Scrapy spiders in a Celery task
- [Django]-Default value for user ForeignKey with Django admin
1π
If you come here and have this problem with some other library while using poetry, try to install it directly in .venv
. For me that was:
pip3 install "transformers[torch]"
- [Django]-What is the advantage of Class-Based views?
- [Django]-Request.user returns a SimpleLazyObject, how do I "wake" it?
- [Django]-How do I perform a batch insert in Django?
0π
according to this response :
https://github.com/pytorch/pytorch/issues/100974#issuecomment-1541856571
you can also install the nvidia-* dependencies specifically,
in your poetry venv / pyproject.toml
- [Django]-Django Installed Apps Location
- [Django]-Get objects from a many to many field
- [Django]-Saving ModelForm error(User_Message could not be created because the data didn't validate)
0π
add this to pyproject.toml
torch = ">=2.0.0, !=2.0.1, !=2.1.0"
poetry install
THIS WORKS
ok im not exactly sure how it works. I checked my history Iβm still confused but when the correct version is selected you should see poetry install
would install a bunch of nvidia libraries. after that when I run my script it works perfectly
- [Django]-How to use dynamic foreignkey in Django?
- [Django]-Dlopen() failed to load a library: cairo / cairo-2
- [Django]-Specify Django Test Database names in settings.py
0π
add this to pyproject.toml
torch = ">=2.0.0, !=2.0.1, !=2.1.0"
poetry lock --no-update
poetry install
- [Django]-Django: 'current_tags' is not a valid tag library
- [Django]-Django test VS pytest
- [Django]-What is a context in Django?
0π
What caused the issue in my case was deleting .local folder where local library files are usually stored. I uninstalled torch
and did a conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
which removed the error and was the beginning of the solution.
- [Django]-Django how to pass custom variables to context to use in custom admin template?
- [Django]-How do you choose between Memcached, Redis and Varnish?
- [Django]-Django, Retrieve IP location