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

Issue 1 Upgrading pip to pip10, breaks NU installation. #185

Closed
russelljjarvis opened this issue Jun 15, 2018 · 6 comments
Closed

Issue 1 Upgrading pip to pip10, breaks NU installation. #185

russelljjarvis opened this issue Jun 15, 2018 · 6 comments
Labels

Comments

@russelljjarvis
Copy link
Contributor

No description provided.

@gsarma
Copy link

gsarma commented Jun 15, 2018

This came up for me with openworm/tests as well. See openworm/tests#11 and scidash/sciunit#70

@russelljjarvis
Copy link
Contributor Author

russelljjarvis commented Jun 15, 2018

Typical output from a failed NU install inside Docker

Step 45/45 : RUN sudo /opt/conda/bin/pip install -e .
 ---> Running in f4fc721eda27
Obtaining file:///home/jovyan/neuronunit
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/jovyan/neuronunit/setup.py", line 48, in <module>
        install_requires=read_requirements(),
      File "/home/jovyan/neuronunit/setup.py", line 24, in read_requirements
        install_reqs = parse_requirements(reqs_path, session=PipSession())
    NameError: name 'parse_requirements' is not defined

Works under pip10
https://github.com/russelljjarvis/neuronunit/blob/dev/setup.py

import os
import requests

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup, find_packages

from setuptools import setup
def read_requirements():
    '''parses requirements from requirements.txt'''
    reqs_path = os.path.join('.', 'requirements.txt')
    install_reqs = parse_requirements(reqs_path, session=PipSession())
    reqs = [str(ir.req) for ir in install_reqs]
    return reqs

setup(
    name='neuronunit',
    version='0.19',
    author='Rick Gerkin',
    author_email='[email protected]',
    packages=['neuronunit',
            'neuronunit.capabilities',
            'neuronunit.neuroconstruct',
            'neuronunit.models',
            'neuronunit.tests',
            'neuronunit.optimization',
            'neuronunit.unit_test'],
    url='http://github.com/scidash/neuronunit',
    license='MIT',
    description='A SciUnit library for data-driven testing of single-neuron physiology models.',
    long_description="",
    test_suite="neuronunit.unit_test.core_tests")    
    #install_requires=read_requirements(),

https://github.com/scidash/neuronunit/blob/master/setup.py

Other people with similar issues suggest downgrading pip
AuthorizeNet/sample-code-python#38
AuthorizeNet/sdk-python#97

@rgerkin
Copy link
Contributor

rgerkin commented Jun 17, 2018

@russelljjarvis @gsarma There is a parse_requirements function in setup.py in both master and dev. So that stack trace isn't actually possible if the correct version of neuronunit is being pulled in the Dockerfile. You can also see that is passes on Travis.

@russelljjarvis
Copy link
Contributor Author

russelljjarvis commented Jun 17, 2018

My mistake, the stack trace I provided was wrong, but I stand by the subject heading of the error message. The stack trace I provided pertained to a developing the workaround solution.

@rgerkin
Copy link
Contributor

rgerkin commented Jun 17, 2018

@russelljjarvis So what is the formula to reproduce the error? For me with pip10 it installs fine.

@russelljjarvis
Copy link
Contributor Author

russelljjarvis commented Jun 17, 2018

Yep, working formula to reproduce the error. Admittedly I have not managed to recreate the error today, as I have been concentrating on the progress report. I will reopen it, if it comes up again. I suspect that the issue involved was caused by short syntax for pip installs, ie pip install -e . instead of a longer form utilizing --follow-dependency links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants