Closed russelljjarvis closed 6 years ago
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='rgerkin@asu.edu',
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 https://github.com/AuthorizeNet/sample-code-python/issues/38 https://github.com/AuthorizeNet/sdk-python/issues/97
@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.
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.
@russelljjarvis So what is the formula to reproduce the error? For me with pip10 it installs fine.
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.
This came up for me with openworm/tests as well. See openworm/tests#11 and scidash/sciunit#70