Closed GabriellaKamlish closed 3 years ago
Thanks for reporting. Are you using conda
? It doesn't look like it. Can you try a fresh conda
environment?
Can you try these lines?: https://github.com/fepegar/highresnet#pytorch-hub
I'm using conda version 4.8.5. I've tried creating a new conda environment, and have also replaced the step "2. Install PyTorch and highresnet" from:
pip install pytorch highresnet
to
pip3 install torch highresnet
since this is the correct package name for PyTorch. I am still receiving the same traceback error
It would help if you could paste a minimal working example that I can try to reproduce (from creating the conda environment to running the command that generates the error). Also, please try running the lines I mentioned above.
Firstly:
ENVNAME="gifenv"
conda create -n $ENVNAME python -y
conda activate gifenv
Then:
pip install pytorch highresnet
Which returns
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Collecting highresnet
Using cached highresnet-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting numpy
Downloading numpy-1.19.4-cp39-cp39-macosx_10_9_x86_64.whl (15.4 MB)
|████████████████████████████████| 15.4 MB 3.6 MB/s
Collecting nibabel
Downloading nibabel-3.2.0-py3-none-any.whl (3.3 MB)
|████████████████████████████████| 3.3 MB 2.7 MB/s
Collecting Click>=7.0
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting SimpleITK
Downloading SimpleITK-1.2.0.tar.gz (2.0 MB)
|████████████████████████████████| 2.0 MB 2.8 MB/s
ERROR: Command errored out with exit status 1:
command: /Users/gabriellakamlish/anaconda3/envs/gifenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/jx/g1ztx09x4_q4x9sw1sc7hrnm0000gn/T/pip-install-7_f_wpso/simpleitk/setup.py'"'"'; __file__='"'"'/private/var/folders/jx/g1ztx09x4_q4x9sw1sc7hrnm0000gn/T/pip-install-7_f_wpso/simpleitk/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/jx/g1ztx09x4_q4x9sw1sc7hrnm0000gn/T/pip-pip-egg-info-tek2ng2l
cwd: /private/var/folders/jx/g1ztx09x4_q4x9sw1sc7hrnm0000gn/T/pip-install-7_f_wpso/simpleitk/
Complete output (4 lines):
scikit-build is required to build from source.
Please run:
python -m pip install scikit-build
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Then:
python -m pip install scikit-build
Then again:
pip install pytorch highresnet
Which returns:
Collecting pytorch
Using cached pytorch-1.0.2.tar.gz (689 bytes)
Collecting highresnet
Using cached highresnet-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting numpy
Using cached numpy-1.19.4-cp39-cp39-macosx_10_9_x86_64.whl (15.4 MB)
Collecting tqdm
Using cached tqdm-4.52.0-py2.py3-none-any.whl (71 kB)
Collecting nibabel
Using cached nibabel-3.2.0-py3-none-any.whl (3.3 MB)
ERROR: Could not find a version that satisfies the requirement torch>=1.1 (from highresnet) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch>=1.1 (from highresnet)
Thanks. I'll try this on macOS as soon as I can.
For now, you can use Google Colab. Change the runtime type to GPU and you can do
!pip install highresnet
!NII_FILE=`download_oasis` && deepgif $NII_FILE
This would be very slow on your mac anyway, as you don't have a large NVIDIA GPU you can use for the inference.
Torch version: 1.6.0
Description
I'm attempting to execute the deepgif model for a t1 image by executing the following in the terminal:
However I seem to be receiving this Traceback error: