How to switch to older version of pytorch?

isalirezag: <p>I have a problem with version 0.4 and what to go back to version 0.3.<br>
How I can do that?</p>
<p>I checked the follwoing link (<a href="https://pytorch.org/previous-versions/" rel="noopener nofollow ugc">https://pytorch.org/previous-versions/</a>)  but when i run the command:<br>
<code>torch-0.3.1-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.</code></p>
<p>it gives me this error:</p>
<blockquote>
<p>torch-0.3.1-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.</p>
</blockquote>

ptrblck: <p>Are you using conda?<br>
If so, try:</p>
<pre><code>conda install -c pytorch pytorch=0.3.1</code></pre>

arjunsankarlal: <p>I am trying to install the version 0.3.0 in Ubuntu and I have installed cuda 10 in it. Can you help me out?</p>

ptrblck: <p>CUDA 10 ships only with the <code>1.0.0</code> binaries as far as I know.<br>
If you need <code>0.3.0</code> you would have to build from source as described <a href="https://github.com/pytorch/pytorch#from-source" rel="nofollow noopener">here</a>.<br>
The highest CUDA version for <code>0.3.0</code> seems to be <a href="https://pytorch.org/get-started/previous-versions/#pytorch-linux-binaries-compiled-with-cuda-90" rel="nofollow noopener">CUDA9.0</a>.</p>

isalirezag: <p>I dont think version 0.3 works with cuda 10. I remember I had to do it with cuda 9.0</p>

Lirbig: <p>Hello,</p>
<p>It is possible to use 2 différent version of pytorch in the same programme?<br>
Because I have a part of my code that works in pytorch 0.3.1 and an other works in the latest version (1.0) and it’s difficult to readjust on code versio  to other.</p>
<p>Thank you for you help</p>

isalirezag: <p>You need to take a look at <a href="https://pytorch.org/blog/pytorch-0_4_0-migration-guide/" rel="nofollow noopener"> PyTorch 0.4.0 Migration Guide</a> to make sure the changes are taken into consideration. In general,  I don’t thin it is a good idea to merge two code from different version with each other</p>

Lirbig: <p>Ok thank you,</p>
<p>When I use my older code into the new version of pytorch (0.4.0), all my code don’t work, but it’s very long to recoding again <img src="https://discuss.pytorch.org/images/emoji/apple/confused.png?v=7" title=":confused:" class="emoji" alt=":confused:"></p>

junaidtariq_tariq: <p>Hy sir am downloading the torch version 1.1.0 with cud 9.0 but its giving an error that cuoldnt download but when i am downloading the latest version it is down loading it and i have the GTX 1050 KINDLY help me that how to download the torch version 1.1.0 with cuda9.0 with GTX 1050 Nvidia.</p>

junaidtariq_tariq: <p>And moreover i am doing it in windows.</p>

ptrblck: <p>Could you post the error?<br>
What does this command output?</p>
<pre><code class="lang-python">conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
</code></pre>

junaidtariq_tariq: <p>Am not using the conda am using pycharm terminal for the installation with OSX which is mention in screen shot below</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/7/d7b90f6429789e14289b802be084cce9932db3fd.png" data-download-href="https://discuss.pytorch.org/uploads/default/d7b90f6429789e14289b802be084cce9932db3fd" title="Torch Error.PNG"><img src="https://discuss.pytorch.org/uploads/default/original/3X/d/7/d7b90f6429789e14289b802be084cce9932db3fd.png" alt="Torch Error.PNG" data-base62-sha1="uMn91NBgR9i2MWJ5YuvnPEDSJWZ" width="690" height="126" data-dominant-color="312F2F"><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">Torch Error.PNG</span><span class="informations">1065×195 6.28 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>

junaidtariq_tariq: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/c/3/c3b367fe862ce339d8e365464c49097b57e15324.png" data-download-href="https://discuss.pytorch.org/uploads/default/c3b367fe862ce339d8e365464c49097b57e15324" title="Capture"><img src="https://discuss.pytorch.org/uploads/default/original/3X/c/3/c3b367fe862ce339d8e365464c49097b57e15324.png" alt="Capture" data-base62-sha1="rVftVUtFxUPQlJNDqz6dD7HG1Xm" width="690" height="221" data-dominant-color="333639"><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">Capture</span><span class="informations">906×291 19.4 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> the cuda 9.2 with latest version of torch is working but i need 1.1.0 kindly help me how to switch on the older one</p>

ptrblck: <p>I’m unfortunately not familiar with PyCharm and don’t know, what the pycharm terminal is. <img src="https://discuss.pytorch.org/images/emoji/apple/confused.png?v=9" title=":confused:" class="emoji" alt=":confused:"></p>

junaidtariq_tariq: <p>ok but sir when i used google colab its giving error of argument parser which creates confliction with the jupyter which ide you will prefer for the development or you using?</p>

ptrblck: <p>What kind of error are you getting on Colab?<br>
I’m using a local <code>conda</code> environment to manage my installs. <img src="https://discuss.pytorch.org/images/emoji/apple/wink.png?v=9" title=":wink:" class="emoji" alt=":wink:"></p>

dugr: <p>Hello, I have neural network trained on older version of PyTorch that need to run.<br>
Apparently, the appropriate version is PyTorch 0.3.1. Can you please share a piece of advice is that even possible anymore since I am having way too many conflicts to downgrade everything in order to be able to install PyTorch 0.3.1. I am running Ubuntu 18.04 and using conda environments.</p>
<p>P.S. I’ve used the same code and datasets to train the network with the newest PyTorch version and it doesn’t produce the same results as the one that is provided on the repository. <a href="https://github.com/facebookresearch/odin" rel="nofollow noopener">https://github.com/facebookresearch/odin</a>. Apparently, if you train the same network with new libraries, the results are different.</p>
<p>Thank you.</p>

ptrblck: <p>I would not recommend to downgrade PyTorch to <code>0.3.1</code>, as this version is too old by now.</p>
<p>Based on your description, I assume you already have an executable code in PyTorch <code>1.5.0</code> or the nightly binaries?<br>
If so, do you see any warnings raised during execution?<br>
How large is the difference and what are you comparing at the moment (final accuracy etc.)?</p>

dugr: <p>Since your last response, I have tried numerous ways to downgrade, and it was extremely inconvenient process. I didn’t have sucess in the end, so decided to listen your advice and just rerun/refactor everything with new version.</p>

Brando_Miranda: <p>how do I make sure that it uses gpu or a specific cua version?</p>
<p>Your original command</p>
<pre><code class="lang-auto">conda install -c pytorch pytorch=0.3.1 
</code></pre>
<p>would this one work?</p>
<pre><code class="lang-auto">conda install pytorch==1.6.0 torchvision cudatoolkit=10.2 -c pytorch
</code></pre>
<p>asking due to DDP deadlocks: <a href="https://github.com/pytorch/pytorch/issues/54550" class="inline-onebox" rel="noopener nofollow ugc">Call to CUDA function failed. with DDP using 4 GPUs · Issue #54550 · pytorch/pytorch · GitHub</a></p>
<p>SO question: <a href="https://stackoverflow.com/questions/56598674/how-to-install-older-version-of-pytorch/66805122#66805122" class="inline-onebox" rel="noopener nofollow ugc">python - How to install older version of pytorch - Stack Overflow</a></p>