Closed Thatfreesky closed 7 years ago
Hi,
it looks like you didn't git clone
the repository. Is it possible that you downloaded it as a zip rather than using git to clone it? Please try again following the steps of the README and report back.
Hello, I still can not use this package.
mountain@Mountain:~$ source activate biomediclasagne
(biomediclasagne) mountain@Mountain:~$ cd GitHub/
(biomediclasagne) mountain@Mountain:~/GitHub$ ls
DSB3Tutorial
FC-DenseNet
ipywidgets
Medical-Image-Analysis-IPython-Tutorials
Medical-Image-Analysis-IPython-Tutorials-master.zip
models
SimpleITK-Notebooks
SimpleITKTutorialMICCAI2015
TensorFlow-Examples
tensorflow_notes
(biomediclasagne) mountain@Mountain:~/GitHub$ git clone --recursive https://github.com/fvisin/dataset_loaders.git
Cloning into 'dataset_loaders'...
remote: Counting objects: 1518, done.
remote: Total 1518 (delta 0), reused 0 (delta 0), pack-reused 1518
Receiving objects: 100% (1518/1518), 415.95 KiB | 235.00 KiB/s, done.
Resolving deltas: 100% (1117/1117), done.
Checking connectivity... done.
Submodule 'dataset_loaders/images/coco' (https://github.com/pdollar/coco.git) registered for path 'dataset_loaders/images/coco'
Cloning into 'dataset_loaders/images/coco'...
remote: Counting objects: 899, done.
remote: Total 899 (delta 0), reused 0 (delta 0), pack-reused 899
Receiving objects: 100% (899/899), 10.38 MiB | 1.18 MiB/s, done.
Resolving deltas: 100% (537/537), done.
Checking connectivity... done.
Submodule path 'dataset_loaders/images/coco': checked out '2934299ee051a601648ee4852b303e1c820aa02e'
(biomediclasagne) mountain@Mountain:~/GitHub$ ls
dataset_loaders
DSB3Tutorial
FC-DenseNet
ipywidgets
Medical-Image-Analysis-IPython-Tutorials
Medical-Image-Analysis-IPython-Tutorials-master.zip
models
SimpleITK-Notebooks
SimpleITKTutorialMICCAI2015
TensorFlow-Examples
tensorflow_notes
(biomediclasagne) mountain@Mountain:~/GitHub$ pip install -e dataset_loaders
Obtaining file:///home/mountain/GitHub/dataset_loaders
Requirement already satisfied: numpy in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: scipy in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: scikit-image in /home/mountain/.local/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: seaborn in /home/mountain/.local/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: Pillow in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: matplotlib in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from dataset-loaders==1.0.0)
Requirement already satisfied: six>=1.7.3 in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from scikit-image->dataset-loaders==1.0.0)
Requirement already satisfied: networkx>=1.8 in /home/mountain/.local/lib/python2.7/site-packages (from scikit-image->dataset-loaders==1.0.0)
Requirement already satisfied: PyWavelets>=0.4.0 in /home/mountain/.local/lib/python2.7/site-packages (from scikit-image->dataset-loaders==1.0.0)
Requirement already satisfied: python-dateutil in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from matplotlib->dataset-loaders==1.0.0)
Requirement already satisfied: pytz in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from matplotlib->dataset-loaders==1.0.0)
Requirement already satisfied: cycler in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages/cycler-0.10.0-py2.7.egg (from matplotlib->dataset-loaders==1.0.0)
Requirement already satisfied: pyparsing!=2.0.4,>=1.5.6 in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from matplotlib->dataset-loaders==1.0.0)
Requirement already satisfied: decorator>=3.4.0 in /home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/site-packages (from networkx>=1.8->scikit-image->dataset-loaders==1.0.0)
Installing collected packages: dataset-loaders
Running setup.py develop for dataset-loaders
Successfully installed dataset-loaders
(biomediclasagne) mountain@Mountain:~/GitHub$ ipython
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15)
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import dataset_loaders
fatal: Not a git repository (or any of the parent directories): .git
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
<ipython-input-1-82d9f777ffc3> in <module>()
----> 1 import dataset_loaders
/home/mountain/GitHub/dataset_loaders/dataset_loaders/__init__.py in <module>()
15
16 __version__ = check_output('git rev-parse HEAD',
---> 17 shell=True).strip().decode('ascii')
/home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/subprocess.pyc in check_output(*popenargs, **kwargs)
217 if cmd is None:
218 cmd = popenargs[0]
--> 219 raise CalledProcessError(retcode, cmd, output=output)
220 return output
221
CalledProcessError: Command 'git rev-parse HEAD' returned non-zero exit status 128
In [2]: exit()
(biomediclasagne) mountain@Mountain:~/GitHub$ cd ..
(biomediclasagne) mountain@Mountain:~$ ipython
Python 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15)
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import dataset_loaders
fatal: Not a git repository (or any of the parent directories): .git
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
<ipython-input-1-82d9f777ffc3> in <module>()
----> 1 import dataset_loaders
/home/mountain/GitHub/dataset_loaders/dataset_loaders/__init__.pyc in <module>()
15
16 __version__ = check_output('git rev-parse HEAD',
---> 17 shell=True).strip().decode('ascii')
/home/mountain/anaconda3/envs/biomediclasagne/lib/python2.7/subprocess.pyc in check_output(*popenargs, **kwargs)
217 if cmd is None:
218 cmd = popenargs[0]
--> 219 raise CalledProcessError(retcode, cmd, output=output)
220 return output
221
CalledProcessError: Command 'git rev-parse HEAD' returned non-zero exit status 128
That's really weird. Can you run an ls -al
inside the ~/GitHub/dataset_loaders
directory and check if there is a .git
directory? If so, can you check that the same is true for ~/GitHub/dataset_loaders/dataset_loaders
?
Wow, the ~/Git/dataset_loaders/dataset_loaders
dictionary does not have the .git
. So, Do I need to initialize this directory?
mountain@Mountain:~$ cd GitHub/
mountain@Mountain:~/GitHub$ cd dataset_loaders/
mountain@Mountain:~/GitHub/dataset_loaders$ ls -al
total 80
drwxrwxr-x 5 mountain mountain 4096 May 2 10:25 .
drwxrwxr-x 13 mountain mountain 4096 May 2 16:57 ..
drwxrwxr-x 6 mountain mountain 4096 May 2 10:26 dataset_loaders
drwxrwxr-x 2 mountain mountain 4096 May 2 10:25 dataset_loaders.egg-info
drwxrwxr-x 9 mountain mountain 4096 May 2 10:25 .git
-rw-rw-r-- 1 mountain mountain 74 May 2 10:25 .gitignore
-rw-rw-r-- 1 mountain mountain 121 May 2 10:25 .gitmodules
-rw-rw-r-- 1 mountain mountain 35141 May 2 10:25 LICENSE.txt
-rw-rw-r-- 1 mountain mountain 3170 May 2 10:25 README.md
-rw-rw-r-- 1 mountain mountain 253 May 2 10:25 setup.cfg
-rw-rw-r-- 1 mountain mountain 4295 May 2 10:25 setup.py
mountain@Mountain:~/GitHub/dataset_loaders$ cd dataset_loaders
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ ls -al
total 168
drwxrwxr-x 6 mountain mountain 4096 May 2 10:26 .
drwxrwxr-x 5 mountain mountain 4096 May 2 10:25 ..
-rw-rw-r-- 1 mountain mountain 812 May 2 10:25 config.ini.example
-rw-rw-r-- 1 mountain mountain 24672 May 2 10:25 data_augmentation.py
-rw-rw-r-- 1 mountain mountain 19850 May 2 10:26 data_augmentation.pyc
-rw-rw-r-- 1 mountain mountain 5487 May 2 10:25 example_dataset.py
drwxrwxr-x 2 mountain mountain 4096 May 2 10:25 extra
drwxrwxr-x 3 mountain mountain 4096 May 2 10:26 images
-rw-rw-r-- 1 mountain mountain 748 May 2 10:25 __init__.py
-rw-rw-r-- 1 mountain mountain 1114 May 2 10:26 __init__.pyc
-rw-rw-r-- 1 mountain mountain 34374 May 2 10:25 parallel_loader.py
-rw-rw-r-- 1 mountain mountain 20831 May 2 10:26 parallel_loader.pyc
-rw-rw-r-- 1 mountain mountain 463 May 2 10:25 preprocessing.py
drwxrwxr-x 3 mountain mountain 4096 May 2 10:25 test
-rw-rw-r-- 1 mountain mountain 2620 May 2 10:25 utils_parallel_loader.py
-rw-rw-r-- 1 mountain mountain 4607 May 2 10:26 utils_parallel_loader.pyc
drwxrwxr-x 2 mountain mountain 4096 May 2 10:26 videos
Ok, that's correct. Can you try to run git status
and git rev-parse HEAD
in ~/GitHub/dataset_loaders
and in ~/GitHub/dataset_loaders/dataset_loaders
?
Those is my result:
mountain@Mountain:~/GitHub/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders$ git rev-parse
mountain@Mountain:~/GitHub/dataset_loaders$ cd dataset_loaders
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git rev-parse
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$
You should run git rev-parse HEAD
rather than git rev-parse
Sorry for my ignorance and thanks for your kindness.
mountain@Mountain:~/GitHub/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders$ git rev-parse HEAD
fa0d7b34858dd8632611ccc030cdf90cdaf2ba4b
mountain@Mountain:~/GitHub/dataset_loaders$ cd dataset_loaders
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git rev-parse HEAD
fa0d7b34858dd8632611ccc030cdf90cdaf2ba4b
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$
Sorry for my ignorance and thanks for your kindness.
mountain@Mountain:~/GitHub/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders$ git rev-parse HEAD
fa0d7b34858dd8632611ccc030cdf90cdaf2ba4b
mountain@Mountain:~/GitHub/dataset_loaders$ cd dataset_loaders
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$ git rev-parse HEAD
fa0d7b34858dd8632611ccc030cdf90cdaf2ba4b
mountain@Mountain:~/GitHub/dataset_loaders/dataset_loaders$
mountain@Mountain:~/GitHub/dataset_loaders$ git rev-parse HEAD fa0d7b34858dd8632611ccc030cdf90cdaf2ba4b
The code that fails for you runs this exact same command and doesn't get the same result. My only guess is that you have an other installation somewhere that is being used instead of this one for some reason.
You can run this to check where the dataset_loaders is installed.
import dataset_loaders
dataset_loaders.__file__
Other than this, I can only suggest you to make sure to remove all and every installation of the dataset_loaders (e.g., checking that you cannot load it in python after removal) and reinstall it again from scratch. If that doesn't work you can try to install it again in an empty python environment. I am sorry but this doesn't look like a dataset_loaders issue but rather an installation problem, and this is as far as I can go to assist you on it. Feel free to open a new issue if you find evidence that this is not the case.
Anyway, thanks
Sure :)
I clone this repository in my '/home/mountain/GitHub/' dictionary. Then, I use below commands to install the dataset_loaders:
I have not got any error, but when I try to import some something from dataset_loaders, I got some error: