rdevon / cortex

A machine learning library for PyTorch
BSD 3-Clause "New" or "Revised" License
92 stars 25 forks source link

Setup fails #208

Open astorfi opened 4 years ago

astorfi commented 4 years ago

Hi, Thank you for your great effort to create this repository.

I cannot setup cortex. I will encounter the following error:

ERROR: Command errored out with exit status 1: command: /home/sina/.conda/envs/pytorch/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-0y42isk4/setup.py'"'"'; file='"'"'/tmp/pip-req-build-0y42isk4/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 pip-egg-info cwd: /tmp/pip-req-build-0y42isk4/ Complete output (24 lines): Traceback (most recent call last): File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/dist.py", line 220, in assert_string_list assert isinstance(value, (list, tuple)) AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-req-build-0y42isk4/setup.py", line 28, in <module>
    zip_safe=False)
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/__init__.py", line 133, in _install_setup_requires
    (k, v) for k, v in attrs.items()
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/dist.py", line 446, in __init__
    k: v for k, v in attrs.items()
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/distutils/dist.py", line 281, in __init__
    self.finalize_options()
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/dist.py", line 734, in finalize_options
    ep.load()(self, ep.name, value)
  File "/home/sina/.conda/envs/pytorch/lib/python3.6/site-packages/setuptools/dist.py", line 225, in assert_string_list
    "%r must be a list of strings (got %r)" % (attr, value)
distutils.errors.DistutilsSetupError: 'dependency_links' must be a list of strings (got {'git+https://github.com/facebookresearch/visdom.git'})
----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Any hint? Thank you

DEUCE1957 commented 4 years ago

From looking at the Python Package documentation, there appears to be a small error in the setup.py file for Cortex where they use a dictionary {} instead of a list [].

To fix it I simply went into the setup.py file and changed: dependency_links={'git+https://github.com/facebookresearch/visdom.git'}, To (the 'git+' is unnecessary so I dropped it): dependency_links=['https://github.com/facebookresearch/visdom.git'],

astorfi commented 4 years ago

Thank you, @DEUCE1957. Can you create a pull request? I think it may help many folks if the owner agrees with it and approves it.

1170300814 commented 3 years ago

wow, I have met that problem. Your answer is very very useful.Thank you very much

From looking at the Python Package documentation, there appears to be a small error in the setup.py file for Cortex where they use a dictionary {} instead of a list [].

To fix it I simply went into the setup.py file and changed: dependency_links={'git+https://github.com/facebookresearch/visdom.git'}, To (the 'git+' is unnecessary so I dropped it): dependency_links=['https://github.com/facebookresearch/visdom.git'],

wow, I have met that problem. Your answer is very very useful.Thank you very much

1170300814 commented 3 years ago

Thank you, @DEUCE1957. Can you create a pull request? I think it may help many folks if the owner agrees with it and approves it.

i agree

MasterJEET commented 3 years ago

From looking at the Python Package documentation, there appears to be a small error in the setup.py file for Cortex where they use a dictionary {} instead of a list [].

To fix it I simply went into the setup.py file and changed: dependency_links={'git+https://github.com/facebookresearch/visdom.git'}, To (the 'git+' is unnecessary so I dropped it): dependency_links=['https://github.com/facebookresearch/visdom.git'],

I wonder if a pull request has been created for this one. I recently faced this exact same issue and the suggested change worked.

MasterJEET commented 3 years ago

There is indeed a pull request: https://github.com/rdevon/cortex/pull/210