How to use torch without nvidia dependencies

Wayne20-ops: <p>I have two conda environments both installing torch==2.1.2, but one with nvidia-cublas-cu12(use pip install torch==2.1.2 recently), the other doesn’t(i install it maybe one year ago):<br>
<img src="https://discuss.pytorch.org/uploads/default/original/3X/0/d/0d7f52c069d82f965911f5b45070e7e0716e0d34.png" alt="image" data-base62-sha1="1VoZKj3RwfPsHzcmePwvWiXpCoA" width="366" height="19"><br>
The One without nvidia-cublas-cu12 can run properly, So I tried to Uninstall nvidia-cublas-cu12 for the one with it, but it raises error like:ValueError: libcublas.so.*[0-9] not found in the system path<br>
I am wondering what’s the difference and the reason why it happens</p>

anantguptadbl: <p><a class="mention" href="/u/wayne20-ops">@Wayne20-ops</a><br>
I tried to use basic torch without nvidia-cublas, and i was able to do so</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/4/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0.png" data-download-href="https://discuss.pytorch.org/uploads/default/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/c/4/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0_2_690x268.png" alt="image" data-base62-sha1="s0oZlOZYGK9PamjkVLZ8IslNxAY" width="690" height="268" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/c/4/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0_2_690x268.png, https://discuss.pytorch.org/uploads/default/original/3X/c/4/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/c/4/c44888f03af5f66c2a4b35e07e01027c4dc0c9c0.png 2x" data-dominant-color="F4F4F5"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">772×300 22.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>Are you trying to use cuda in your code?</p>

Wayne20-ops: <p>when I just run “import torch”, it will raise error because of the cublas missing</p>

anantguptadbl: <p>I did not face that.</p>
<p>Can you provide the outputs of the below commands</p>
<pre><code class="lang-auto">pip list | grep cublas
pip list | grep torch
pip list | grep numpy
</code></pre>

Wayne20-ops: <aside class="quote no-group" data-username="anantguptadbl" data-post="4" data-topic="216296">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/anantguptadbl/48/17784_2.png" class="avatar"> anantguptadbl:</div>
<blockquote>
<p><code>pip list | grep torch</code></p>
</blockquote>
</aside>
<p>$ pip list | grep numpy<br>
numpy                             1.26.4<br>
numpydoc                          1.5.0<br>
$ pip list | grep torch<br>
torch                             2.1.2<br>
$ pip list | grep cublas</p>

anantguptadbl: <p><a class="mention" href="/u/wayne20-ops">@Wayne20-ops</a>  try to uninstall numpy and install it back again. Mine shows 2.2.2</p>

Wayne20-ops: <p>I tried to install numpy the same as yours, but still get the same error</p>