Different python version with pytorch

username: Error0229
cooked: <p>I have both python3.6 and python3.9 installed in my machine.<br>
For some reason I need to use some package only available in python3.9<br>
And I have torch 1.9.0 installed in python3.6 and <code>torch.cuda.is_available()</code> return true<br>
Now I install same torch version in python3.9 but torch cannot collect cuda this time.</p>
<p>details about <code>torch.utils.collect_env</code> of both python version:<br>
python3.6</p>
<pre><code class="lang-auto">PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (aarch64)
GCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.10.2
Libc version: glibc-2.25

Python version: 3.6 (64-bit runtime)
Python platform: Linux-4.9.201-tegra-aarch64-with-Ubuntu-18.04-bionic
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.9.0
[conda] Could not collect
</code></pre>
<p>python3.9</p>
<pre><code class="lang-auto">PyTorch version: 1.9.0
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.6 LTS (aarch64)
GCC version: (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.10.2
Libc version: glibc-2.27

Python version: 3.9 (64-bit runtime)
Python platform: Linux-4.9.201-tegra-aarch64-with-glibc2.27
Is CUDA available: False
CUDA runtime version: 10.2.89
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.0.0
/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.0.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.9.0
[conda] Could not collect
</code></pre>
<p>Any help would be greatly appreciated</p>

username: ptrblck
cooked: <aside class="quote no-group" data-username="Error0229" data-post="1" data-topic="181822">
<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/error0229/48/61172_2.png" class="avatar"> Error0229:</div>
<blockquote>
<p><code>CUDA used to build PyTorch: Could not collect</code></p>
</blockquote>
</aside>
<p>Could you check if the installed pip wheel contains the CUDA runtime via <code>print(torch.version.cuda)</code>?</p>

username: Error0229
cooked: <p>For python3.6 It prints <code>'10.2'</code> and for python3.9 it prints <code>None</code><br>
So is it mean I need to install another torch with contains CUDA runtime?</p>

username: ptrblck
cooked: <p>This would mean you’ve installed the CPU-only binary in your Python=3.9 environment which explains why no GPU can be used and CUDA cannot be found.</p>

username: Error0229
cooked: <p>But I install pytorch with same wheel file on both python version.<br>
Also this is a aarch64 device, is this possible to specify GPU version pytorch to download?</p>

username: ptrblck
cooked: <p>No, ARM wheels are built for Mac M1/M2, if I’m not mistaken, which do not support CUDA.<br>
I don’t think ARM wheels with CUDA support are built at the moment, but funny enough we were just discussing it and I will check what would be needed to enable it.</p>