holzschu / holzschu/Carnets

Torch module install failed

Open
#82 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
634
Forks
44
PR merge metrics
No merged PRs in 30d

Description

I just installed this wonderful app and I was wondering whether the pytorch is available on it or not yet. After I typed ‘%pip install torch’ ,it showed this error report.Is that means torch is not available. Or am I just need to set something right before running the install process.
Thanks!

Collecting torch
Using cached https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz
Requirement already satisfied: pyyaml in /private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/site-packages (from torch) (5.1)
Installing collected packages: torch
- Running setup.py install for torch ... error

ERROR: Complete output from command /var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/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/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-record-rwv1d5bb/install-record.txt --single-version-externally-managed --compile:

ERROR: running install
running build_deps
Traceback (most recent call last):
File "", line 1, in
File "/private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/setup.py", line 265, in
description="Tensors and Dynamic neural networks in Python with strong GPU acceleration",
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/distutils/core.py", line 148, in setup
dist.run_commands()
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/setup.py", line 99, in run
self.run_command('build_deps')
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/lib/python3.7/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/setup.py", line 51, in run
from tools.nnwrap import generate_wrappers as generate_nn_wrappers
ModuleNotFoundError: No module named 'tools.nnwrap'
----------------------------------------
ERROR: Command "/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/Library/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/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/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-record-rwv1d5bb/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/mobile/Containers/Data/Application/BCDEBB91-346D-4660-AA6E-8650568CDF84/tmp/pip-install-9du010hs/torch/

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reproducing `%pip install torch` in Carnets and inspect the reported torch `setup.py` failure, especially `ModuleNotFoundError: No module named 'tools.nnwrap'`. Done means establishing whether PyTorch is supported in this app and identifying a confirmed fix or documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, python, pytorch
Domain
machine-learning, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.