# PyTorch Install with Python3 Broken

**URL:** https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146
**Category:** Jetson TX2
**Created:** [October 13, 2018, 8:44pm UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146 "2018-10-13T20:44:33Z")
**Posts on this page:** 7
**Page:** 2

<div class="post-metadata">

### Author: ![bygreencn](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/bygreencn/32/11080_2.png) [@bygreencn](https://forums.developer.nvidia.com/u/bygreencn)
#### Post date: [May 31, 2019, 4:41am UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/21 "2019-05-31T04:41:24Z")

</div>

Just comment tools/setup\_helpers/nccl.py line 9, and add line after it as USE\_NCCL = False will be OK.

---

<div class="post-metadata">

### Author: ![varun365](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/varun365/32/12928_2.png) [@varun365](https://forums.developer.nvidia.com/u/varun365)
#### Post date: [June 6, 2019, 7:13am UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/22 "2019-06-06T07:13:00Z")

</div>

Hi brenozanchetta

I followed your pytorch\_install.sh (using jetpack 4.2)

In the repo  
line 24: wget [https://rpmfind.net/linux/mageia/distrib/cauldron/aarch64/media/core/release/ninja-1.8.2-3.mga7.aarch64.rpm](https://rpmfind.net/linux/mageia/distrib/cauldron/aarch64/media/core/release/ninja-1.8.2-3.mga7.aarch64.rpm)

file ninja-1.8.2-3.mga7.aarch64.rpm is missing.

however i tried with ninja-1.9.0-2.mga7.aarch64.rpm, but stuck at this step

```auto
-- Build files have been written to: /home/venv/pytorch/build
[6/2849] Building CXX object third_party/protobuf/cmake/CMakeFi...bprotobuf.dir/__/src/google/protobuf/implicit_weak_message.cc.o
[17/2849] Building CXX object third_party/protobuf/cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/message_lite.cc.o

nvlink error : entry function '_Z33ncclAllReduceTreeLLKernel_sum_i328ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
nvlink error : entry function '_Z33ncclAllReduceRingLLKernel_sum_i328ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
nvlink error : entry function '_Z32ncclAllReduceTreeLLKernel_sum_u88ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
nvlink error : entry function '_Z32ncclAllReduceRingLLKernel_sum_u88ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
nvlink error : entry function '_Z32ncclAllReduceTreeLLKernel_sum_i88ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
nvlink error : entry function '_Z32ncclAllReduceRingLLKernel_sum_i88ncclColl' with max regcount of 80 calls function '_ZN14ncclPrimitivesILi4ELi2ELi2EdLi1ELi1E7FuncMaxIdEE9GenericOpILi0ELi0ELi1ELi0ELi1ELi1EEEvPKdPdii' with regcount of 96
Makefile:68: recipe for target '/home/venv/pytorch/build/nccl/obj/collectives/device/devlink.o' failed
make[2]: *** [/home/venv/pytorch/build/nccl/obj/collectives/device/devlink.o] Error 255
make[2]: Leaving directory '/home/venv/pytorch/third_party/nccl/nccl/src/collectives/device'
Makefile:44: recipe for target '/home/venv/pytorch/build/nccl/obj/collectives/device/colldevice.a' failed
make[1]: *** [/home/venv/pytorch/build/nccl/obj/collectives/device/colldevice.a] Error 2
make[1]: Leaving directory '/home/venv/pytorch/third_party/nccl/nccl/src'
Makefile:25: recipe for target 'src.build' failed
make: *** [src.build] Error 2
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 757, in <module>
    build_deps()
  File "setup.py", line 317, in build_deps
    build_dir='build')
  File "/home/venv/pytorch/tools/build_pytorch_libs.py", line 88, in build_caffe2
    check_call(build_cmd, cwd=build_dir, env=my_env)
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Debug', '--', '-j', '6']' returned non-zero exit status 1.

```

---

<div class="post-metadata">

### Author: ![dongxiao](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dongxiao](https://forums.developer.nvidia.com/u/dongxiao)
#### Post date: [June 17, 2019, 7:29am UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/23 "2019-06-17T07:29:39Z")

</div>

> [@](#):
>
> Just comment **tools/setup\_helpers/nccl.py** line 9, and add line after it as USE\_NCCL = False will be OK.

Thanks! Your method solves my problem. It seems this code is responsible for the incorrect controlling of ‘USE\_NCCL’.

---

<div class="post-metadata">

### Author: ![brenozanchetta](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@brenozanchetta](https://forums.developer.nvidia.com/u/brenozanchetta)
#### Post date: [June 25, 2019, 7:55pm UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/24 "2019-06-25T19:55:09Z")

</div>

varun365, my list of commands is a collection of many posts on many forums.  
Ninja was present on at least three good tutorials, however the basic installation through pip gave users too much trouble on JetPack 3.1.  
However, I never tried on JetPack 4.2, so you must be good with a simple pip installation.  
My memory is a little foggy, but if that does not work, one of the next solutions may help you:

1. Try installing with alien instead of dpkg, or vice-versa.

2. Search the version that used to be on the link that I provided elsewhere, e.g. [RPM resource ninja(aarch-64)](http://www.rpmfind.info/linux/rpm2html/search.php?query=ninja(aarch-64))

3. See dustin-nv, from NVIDIA, he has many good tips about this.

Hope this helps!

---

<div class="post-metadata">

### Author: ![ela\_new2020](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ela\_new2020](https://forums.developer.nvidia.com/u/ela_new2020)
#### Post date: [December 14, 2019, 8:04am UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/25 "2019-12-14T08:04:17Z")

</div>

Hello…

I got below error message when install pytorch:

[41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/reduce\_ops.cc.o  
[41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/piecewise\_linear\_transform\_op.cc.o  
[41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/listwise\_l2r\_op.cc.o  
c++: internal compiler error: Killed (program cc1plus)  
Please submit a full bug report,  
with preprocessed source if appropriate.  
See \<file:///usr/share/doc/gcc-5/README.Bugs\> for instructions.  
caffe2/CMakeFiles/torch\_cpu.dir/build.make:7978: recipe for target ‘caffe2/CMakeFiles/torch\_cpu.dir/contrib/aten/aten\_op.cc.o’ failed  
make[2]: \*\*\* [caffe2/CMakeFiles/torch\_cpu.dir/contrib/aten/aten\_op.cc.o] Error 4  
make[2]: \*\*\* Waiting for unfinished jobs…  
CMakeFiles/Makefile2:6447: recipe for target ‘caffe2/CMakeFiles/torch\_cpu.dir/all’ failed  
make[1]: \*\*\* [caffe2/CMakeFiles/torch\_cpu.dir/all] Error 2  
Makefile:138: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2  
Traceback (most recent call last):  
File “setup.py”, line 755, in   
build\_deps()  
File “setup.py”, line 316, in build\_deps  
cmake=cmake)  
File “/home/nvidia/pytorch/tools/build\_pytorch\_libs.py”, line 62, in build\_caffe2  
cmake.build(my\_env)  
File “/home/nvidia/pytorch/tools/setup\_helpers/cmake.py”, line 339, in build  
self.run(build\_args, my\_env)  
File “/home/nvidia/pytorch/tools/setup\_helpers/cmake.py”, line 141, in run  
check\_call(command, cwd=self.build\_dir, env=env)  
File “/usr/lib/python3.5/subprocess.py”, line 581, in check\_call  
raise CalledProcessError(retcode, cmd)  
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘6’]’ returned non-zero exit status

Anyone have any idea??

Thanks.

---

<div class="post-metadata">

### Author: ![kayccc](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/kayccc/32/14043_2.png) [@kayccc](https://forums.developer.nvidia.com/u/kayccc)
#### Post date: [December 26, 2019, 2:27am UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/26 "2019-12-26T02:27:19Z")

</div>

> [@](#):
>
> Hello…
> 
> I got below error message when install pytorch:
> 
> [41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/reduce\_ops.cc.o  
> [41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/piecewise\_linear\_transform\_op.cc.o  
> [41%] Building CXX object caffe2/CMakeFiles/torch\_cpu.dir/operators/listwise\_l2r\_op.cc.o  
> c++: internal compiler error: Killed (program cc1plus)  
> Please submit a full bug report,  
> with preprocessed source if appropriate.  
> See \<file:///usr/share/doc/gcc-5/README.Bugs\> for instructions.  
> caffe2/CMakeFiles/torch\_cpu.dir/build.make:7978: recipe for target ‘caffe2/CMakeFiles/torch\_cpu.dir/contrib/aten/aten\_op.cc.o’ failed  
> make[2]: \*\*\* [caffe2/CMakeFiles/torch\_cpu.dir/contrib/aten/aten\_op.cc.o] Error 4  
> make[2]: \*\*\* Waiting for unfinished jobs…  
> CMakeFiles/Makefile2:6447: recipe for target ‘caffe2/CMakeFiles/torch\_cpu.dir/all’ failed  
> make[1]: \*\*\* [caffe2/CMakeFiles/torch\_cpu.dir/all] Error 2  
> Makefile:138: recipe for target ‘all’ failed  
> make: \*\*\* [all] Error 2  
> Traceback (most recent call last):  
> File “setup.py”, line 755, in   
> build\_deps()  
> File “setup.py”, line 316, in build\_deps  
> cmake=cmake)  
> File “/home/nvidia/pytorch/tools/build\_pytorch\_libs.py”, line 62, in build\_caffe2  
> cmake.build(my\_env)  
> File “/home/nvidia/pytorch/tools/setup\_helpers/cmake.py”, line 339, in build  
> self.run(build\_args, my\_env)  
> File “/home/nvidia/pytorch/tools/setup\_helpers/cmake.py”, line 141, in run  
> check\_call(command, cwd=self.build\_dir, env=env)  
> File “/usr/lib/python3.5/subprocess.py”, line 581, in check\_call  
> raise CalledProcessError(retcode, cmd)  
> subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘6’]’ returned non-zero exit status
> 
> Anyone have any idea??
> 
> Thanks.

Hi ela\_new2020,

Please refer to [https://elinux.org/Jetson\_Zoo](https://elinux.org/Jetson_Zoo).  
If still met issue, please file a new topic for your own issue.

Thanks

---

<div class="post-metadata">

### Author: ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)
#### Post date: [October 18, 2021, 6:19pm UTC](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146/27 "2021-10-18T18:19:34Z")

</div>



[Previous page](https://forums.developer.nvidia.com/t/pytorch-install-with-python3-broken/66146.md?page=1)
