Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to install pytorch on pycharm #42353

Open
theAkhileshRai opened this issue Jul 31, 2020 · 2 comments
Open

Error while trying to install pytorch on pycharm #42353

theAkhileshRai opened this issue Jul 31, 2020 · 2 comments
Labels
module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@theAkhileshRai
Copy link

theAkhileshRai commented Jul 31, 2020

🐛 Bug

Correct way of installation is torch.
This should be removed as it is misleading.

ERROR: Command errored out with exit status 1:

To Reproduce

Steps to reproduce the behavior:

1.Install Pycharm
2.Select Preferences
3.Python interpreter
4.Select +
5. Search Pytorch
6. Click on OK

Expected behavior

Collecting pytorch
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Building wheels for collected packages: pytorch
Building wheel for pytorch (setup.py): started
Building wheel for pytorch (setup.py): finished with status 'error'
Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch: started
Running setup.py install for pytorch: finished with status 'error'

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at pypa/pip#8333.
ERROR: Command errored out with exit status 1:
command: /Users/manishrai/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/pytorch/setup.py'"'"'; file='"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/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 /private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pip-wheel-6ne2a5ra
cwd: /private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/pytorch/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/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
DEPRECATION: Could not build wheels for pytorch which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at pypa/pip#8368.
ERROR: Command errored out with exit status 1:
command: /Users/manishrai/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/pytorch/setup.py'"'"'; file='"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/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 /private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pip-record-jldeg9tb/install-record.txt --single-version-externally-managed --compile --install-headers /Users/manishrai/venv/include/site/python3.8/pytorch
cwd: /private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/pytorch/
Complete output (5 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/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: /Users/manishrai/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/pytorch/setup.py'"'"'; file='"'"'/private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pycharm-packaging/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 /private/var/folders/82/lkm_wx_j42qbx84bs1zq3psm0000gn/T/pip-record-jldeg9tb/install-record.txt --single-version-externally-managed --compile --install-headers /Users/manishrai/venv/include/site/python3.8/pytorch Check the logs for full command output.

Environment

Please copy and paste the output from our
environment collection script
(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
  • PyTorch Version (e.g., 1.0):
  • OS (e.g., Linux):
  • How you installed PyTorch (conda, pip, source):
  • Build command you used (if compiling from source):
  • Python version:
  • CUDA/cuDNN version:
  • GPU models and configuration:
  • Any other relevant information:

Expected Output:

This should be removed as it is misleading.
Correct way of installation is torch.

I did install it and it worked. Just notifying the Pytorch team about the misleading preference on Pycharm. Please check as it damages your credibility.

cc @malfet

@mruberry mruberry added module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Aug 1, 2020
@hebeishui
Copy link

请问这个问题怎么解决啊?

@jahidhasanlinix
Copy link

I am having issue installing PyTorch in Pycharm in my Ubuntu machine. Its not installing, always show error:

Collecting pytorch
Using cached https://files.pythonhosted.org/packages/ee/67/f403d4ae6e9cd74b546ee88cccdb29b8415a9c1b3d80aebeb20c9ea91d96/pytorch-1.0.2.tar.gz
Building wheels for collected packages: pytorch
Running setup.py bdist_wheel for pytorch: started
Running setup.py bdist_wheel for pytorch: finished with status 'error'
Complete output from command /usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-phxcosdv/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/tmpg62rk4stpip-wheel- --python-tag cp37:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-phxcosdv/pytorch/setup.py", line 15, in
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"


Running setup.py clean for pytorch
Failed to build pytorch
Installing collected packages: pytorch
Running setup.py install for pytorch: started
Running setup.py install for pytorch: finished with status 'error'
Complete output from command /usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-phxcosdv/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-lwyn4iix-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-phxcosdv/pytorch/setup.py", line 11, in
raise Exception(message)
Exception: You tried to install "pytorch". The package named for PyTorch is "torch"

----------------------------------------

Cache entry deserialization failed, entry ignored
Failed building wheel for pytorch
Command "/usr/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-phxcosdv/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-lwyn4iix-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-phxcosdv/pytorch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants