Skip to content

Conversation

@yarikoptic
Copy link
Member

otherwise - kaboom:

$> virtualenv venv-tests
Running virtualenv with interpreter /usr/bin/python2
New python executable in /tmp/venv-tests/bin/python2
Also creating executable in /tmp/venv-tests/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
2 16589.....................................:Mon 31 Oct 2016 12:36:49 PM EDT:.
hopa:/tmp
$> source venv-tests/bin/activate
(venv-tests) 2 16590.....................................:Mon 31 Oct 2016 12:36:51 PM EDT:.
hopa:/tmp
$> pip install nipype
Collecting nipype
  Using cached nipype-0.12.1-py2.py3-none-any.whl
Collecting nibabel>=2.0.1 (from nipype)
Collecting traits>=4.3 (from nipype)
Collecting future>=0.15.2 (from nipype)
Collecting scipy>=0.11 (from nipype)
  Using cached scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl
Collecting xvfbwrapper (from nipype)
Collecting numpy>=1.6.2 (from nipype)
  Using cached numpy-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting python-dateutil>=1.5 (from nipype)
  Using cached python_dateutil-2.5.3-py2.py3-none-any.whl
Collecting prov>=1.4.0 (from nipype)
  Using cached prov-1.5.0-py2.py3-none-any.whl
Collecting simplejson>=3.8.0 (from nipype)
Collecting mock (from nipype)
  Using cached mock-2.0.0-py2.py3-none-any.whl
Collecting networkx>=1.7 (from nipype)
  Using cached networkx-1.11-py2.py3-none-any.whl
Collecting nose>=1.2 (from nipype)
  Using cached nose-1.3.7-py2-none-any.whl
Collecting six>=1.5 (from python-dateutil>=1.5->nipype)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting lxml (from prov>=1.4.0->nipype)
  Using cached lxml-3.6.4-cp27-cp27mu-manylinux1_x86_64.whl
Collecting rdflib>=4.2.1 (from prov>=1.4.0->nipype)
Collecting funcsigs>=1; python_version < "3.3" (from mock->nipype)
  Using cached funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->nipype)
  Using cached pbr-1.10.0-py2.py3-none-any.whl
Collecting decorator>=3.4.0 (from networkx>=1.7->nipype)
  Using cached decorator-4.0.10-py2.py3-none-any.whl
Collecting pyparsing (from rdflib>=4.2.1->prov>=1.4.0->nipype)
  Using cached pyparsing-2.1.10-py2.py3-none-any.whl
Collecting isodate (from rdflib>=4.2.1->prov>=1.4.0->nipype)
Collecting SPARQLWrapper (from rdflib>=4.2.1->prov>=1.4.0->nipype)
Collecting html5lib (from rdflib>=4.2.1->prov>=1.4.0->nipype)
  Using cached html5lib-0.999999999-py2.py3-none-any.whl
Collecting keepalive>=0.5 (from SPARQLWrapper->rdflib>=4.2.1->prov>=1.4.0->nipype)
Requirement already satisfied (use --upgrade to upgrade): setuptools>=18.5 in ./venv-tests/lib/python2.7/site-packages (from html5lib->rdflib>=4.2.1->prov>=1.4.0->nipype)
Collecting webencodings (from html5lib->rdflib>=4.2.1->prov>=1.4.0->nipype)
Installing collected packages: numpy, nibabel, traits, future, scipy, xvfbwrapper, six, python-dateutil, lxml, decorator, networkx, pyparsing, isodate, keepalive, SPARQLWrapper, webencodings, html5lib, rdflib, prov, simplejson, funcsigs, pbr, mock, nose, nipype
Successfully installed SPARQLWrapper-1.7.6 decorator-4.0.10 funcsigs-1.0.2 future-0.16.0 html5lib-0.999999999 isodate-0.5.4 keepalive-0.5 lxml-3.6.4 mock-2.0.0 networkx-1.11 nibabel-2.1.0 nipype-0.12.1 nose-1.3.7 numpy-1.11.2 pbr-1.10.0 prov-1.5.0 pyparsing-2.1.10 python-dateutil-2.5.3 rdflib-4.2.1 scipy-0.18.1 simplejson-3.10.0 six-1.10.0 traits-4.5.0 webencodings-0.5 xvfbwrapper-0.2.8
pip install nipype  8.94s user 1.22s system 95% cpu 10.595 total
(venv-tests) 2 16591.....................................:Mon 31 Oct 2016 12:37:06 PM EDT:.
hopa:/tmp
$> python -c 'from nipype import Function, Node'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/venv-tests/local/lib/python2.7/site-packages/nipype/__init__.py", line 11, in <module>
    from .utils.config import NipypeConfig
  File "/tmp/venv-tests/local/lib/python2.7/site-packages/nipype/utils/config.py", line 15, in <module>
    import configparser
ImportError: No module named configparser

oesteban added a commit to oesteban/nipype that referenced this pull request Oct 31, 2016
@oesteban
Copy link
Contributor

oesteban commented Oct 31, 2016

@yarikoptic I just confirmed that we missed out configparser from the requirements.

It is important to note that the list of requirements is not given by the requirements.txt file anymore, rather than the REQUIRES list inside nipype/info.py. This is a consequence of moving to a full-setuptools install.

Thanks for spotting this :)

EDIT: I just realized this is a PR itself, closed mine (duplicated).

@codecov-io
Copy link

Current coverage is 70.75% (diff: 100%)

Merging #1697 into master will not change coverage

@@             master      #1697   diff @@
==========================================
  Files          1030       1030          
  Lines         51764      51764          
  Methods           0          0          
  Messages          0          0          
  Branches       7327       7327          
==========================================
  Hits          36628      36628          
  Misses        14045      14045          
  Partials       1091       1091          

Powered by Codecov. Last update 55d052b...f31d247

@satra
Copy link
Member

satra commented Oct 31, 2016

we should update this in requirements.txt and requirements_rtd.txt - come to think of it, i don't know if requirements.txt is used anywhere (travis, circle?). if not we can simply keep requirements_rtd.txt, used in readthedocs.

@oesteban
Copy link
Contributor

@satra - absolutely right, with setuptools, the requirements.txt files are a bit misleading. They are useful when you want to set up an specific environment (for instance, the requirements_rtd.txt for readthedocs is the perfect example).

In practice, we shouldn't use requirements.txt in travis or circle (and I guess they are there, I will submit a PR for it ASAP, if I confirm we are doing this).

We could keep the requirements.txt only for developers. But, I cannot think of one dependency that needs to be pre-installed if you are to be a developer that cannot be installed by setuptools. Perhaps something related to vtk and mayavi that needs to be installed with conda, but still this is off requirements.txt use.

+1 to remove the requirements.txt.

@matthew-brett
Copy link
Member

I notice that pip install nipype still does not install configparser - should it?

@satra
Copy link
Member

satra commented Jun 1, 2017

@matthew-brett - it should install configparser for py <= 3.4

https://github.com/nipy/nipype/blob/master/nipype/info.py#L148

@matthew-brett
Copy link
Member

Right - sorry - I should have said - I was testing on Python 2.7 - it does not install configparser. Does it install configparser for you?

@matthew-brett
Copy link
Member

Here's me installing into a fresh Python 2.7 virtualenv:

Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
New python executable in /Users/mb312/.virtualenvs/test/bin/python
Installing setuptools, pip, wheel...done.
(test) [mb312@shanghai ~/dev_trees/heudiconv (fix-travis-testing)]$ pip install nipype
Collecting nipype
  Using cached nipype-0.13.1-py2.py3-none-any.whl
Collecting pydotplus (from nipype)
Collecting nibabel>=2.1.0 (from nipype)
Collecting pytest>=3.0 (from nipype)
  Using cached pytest-3.1.1-py2.py3-none-any.whl
Collecting simplejson>=3.8.0 (from nipype)
Collecting traits>=4.6 (from nipype)
Collecting networkx>=1.9 (from nipype)
  Using cached networkx-1.11-py2.py3-none-any.whl
Collecting future>=0.16.0 (from nipype)
Collecting numpy>=1.8.2 (from nipype)
  Using cached numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting scipy>=0.14 (from nipype)
  Using cached scipy-0.19.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Collecting mock (from nipype)
  Using cached mock-2.0.0-py2.py3-none-any.whl
Collecting click>=6.6.0 (from nipype)
  Using cached click-6.7-py2.py3-none-any.whl
Collecting python-dateutil>=2.2 (from nipype)
  Using cached python_dateutil-2.6.0-py2.py3-none-any.whl
Collecting prov>=1.5.0 (from nipype)
  Using cached prov-1.5.0-py2.py3-none-any.whl
Collecting funcsigs (from nipype)
  Using cached funcsigs-1.0.2-py2.py3-none-any.whl
Collecting pyparsing>=2.0.1 (from pydotplus->nipype)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Collecting py>=1.4.29 (from pytest>=3.0->nipype)
  Using cached py-1.4.33-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Users/mb312/.virtualenvs/test/lib/python2.7/site-packages (from pytest>=3.0->nipype)
Collecting decorator>=3.4.0 (from networkx>=1.9->nipype)
  Using cached decorator-4.0.11-py2.py3-none-any.whl
Collecting pbr>=0.11 (from mock->nipype)
  Using cached pbr-3.0.1-py2.py3-none-any.whl
Collecting six>=1.9 (from mock->nipype)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting rdflib>=4.2.1 (from prov>=1.5.0->nipype)
Collecting lxml (from prov>=1.5.0->nipype)
Collecting isodate (from rdflib>=4.2.1->prov>=1.5.0->nipype)
Installing collected packages: pyparsing, pydotplus, numpy, nibabel, py, pytest, simplejson, traits, decorator, networkx, future, scipy, funcsigs, pbr, six, mock, click, python-dateutil, isodate, rdflib, lxml, prov, nipype
Successfully installed click-6.7 decorator-4.0.11 funcsigs-1.0.2 future-0.16.0 isodate-0.5.4 lxml-3.7.3 mock-2.0.0 networkx-1.11 nibabel-2.1.0 nipype-0.13.1 numpy-1.12.1 pbr-3.0.1 prov-1.5.0 py-1.4.33 pydotplus-2.0.2 pyparsing-2.2.0 pytest-3.1.1 python-dateutil-2.6.0 rdflib-4.2.2 scipy-0.19.0 simplejson-3.10.0 six-1.10.0 traits-4.6.0
(test) $ python -c 'import configparser'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named configparser

@satra
Copy link
Member

satra commented Jun 1, 2017

@matthew-brett - i did not test with pip from pypi after pushing the wheel. looks like the wheel file is the issue. if you do:

$ pip install https://github.com/nipy/nipype/archive/0.13.1.zip
Collecting https://github.com/nipy/nipype/archive/0.13.1.zip
  Downloading https://github.com/nipy/nipype/archive/0.13.1.zip
     \ 4.2MB 4.4MB/s
...
Installing collected packages: nibabel, decorator, networkx, numpy, six, python-dateutil, scipy, traits, future, simplejson, pyparsing, isodate, rdflib, lxml, prov, click, funcsigs, py, pytest, pbr, mock, pydotplus, configparser, nipype
  Running setup.py install for nipype ... done
Successfully installed click-6.7 configparser-3.5.0 decorator-4.0.11 funcsigs-1.0.2 future-0.16.0 isodate-0.5.4 lxml-3.7.3 mock-2.0.0 networkx-1.11 nibabel-2.1.0 nipype-0.13.1 numpy-1.12.1 pbr-3.0.1 prov-1.5.0 py-1.4.33 pydotplus-2.0.2 pyparsing-2.2.0 pytest-3.1.1 python-dateutil-2.6.0 rdflib-4.2.2 scipy-0.19.0 simplejson-3.10.0 six-1.10.0 traits-4.6.0

i had created the wheel with: python setup.py bdist_wheel --universal any suggestions for what i should have done?

@matthew-brett
Copy link
Member

Is there any cost to installing configparser on Python >= 3.4? If not, then I guess you could just rebuild the wheel with Python 2.7 (so it picks up the dependency). Use build tags to upload the wheel - see https://github.com/MacPython/wiki/wiki/Build-Tags .

Otherwise, I guess you'll have to either remove the wheel or make different wheels for Python < 3.4 and Python >= 3.4, making sure that you're building with a Python giving the correct result for the sys.version_info test.

@matthew-brett
Copy link
Member

Checking now, I think installing configparser has no effect on Python 3.5, importing configparser gets the system version.

@satra
Copy link
Member

satra commented Jun 1, 2017

@matthew-brett - thank you. for the moment i deleted the wheel file, just keeping the source file in pypi. since nipype doesn't really have any binary components it should work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants