ComplexCNN icon indicating copy to clipboard operation
ComplexCNN copied to clipboard

Failed building wheel for pytorch

Open ZhengSaber opened this issue 4 years ago • 1 comments

I am sorry. Recently, I wanna achieve a CNN for complex value. However, it is failed to install the package of complexcnn. I try it on Ubuntu OS and I already install the PyTorch. The installation operation as follow code, which is following the usage:

pip3 install complexcnn

Then, I got error logs:

Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Processing /home/zheng_saber/.cache/pip/wheels/2d/55/ec/03d3284099dccbb57f283a69ea6b36a2ceb443457521615b21/complexcnn-0.1-py3-none-any.whl Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from complexcnn) (1.18.5) Collecting pytorch Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ee/67/f403d4ae6e9cd74b546ee88cccdb29b8415a9c1b3d80aebeb20c9ea91d96/pytorch-1.0.2.tar.gz (689 bytes) Building wheels for collected packages: pytorch Building wheel for pytorch (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"'; file='"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-pjc0qhwo cwd: /tmp/pip-install-cn6m9oau/pytorch/ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-cn6m9oau/pytorch/setup.py", line 15, in raise Exception(message) Exception: You tried to install "pytorch". The package named for PyTorch is "torch"

ERROR: Failed building wheel for pytorch Running setup.py clean for pytorch Failed to build pytorch Installing collected packages: pytorch, complexcnn Running setup.py install for pytorch ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"'; file='"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-qwbdg96q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/zheng_saber/.local/include/python3.6m/pytorch cwd: /tmp/pip-install-cn6m9oau/pytorch/ Complete output (5 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-cn6m9oau/pytorch/setup.py", line 11, in raise Exception(message) Exception: You tried to install "pytorch". The package named for PyTorch is "torch" ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"'; file='"'"'/tmp/pip-install-cn6m9oau/pytorch/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-qwbdg96q/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/zheng_saber/.local/include/python3.6m/pytorch Check the logs for full command output.

I wonder if the error caused by the name of "pytoruch" in setup file according to the log, "You tried to install "pytorch". The package named for PyTorch is "torch". Is that right? and what should I do to install this package. Thanks~

ZhengSaber avatar Aug 26 '21 09:08 ZhengSaber

You should try to install pytorch using following command

pip install torch

litcoderr avatar Dec 06 '21 13:12 litcoderr