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

Problem installing CosmoABC on python 3.8.5 #6

Open
Vokturz opened this issue Nov 4, 2021 · 0 comments
Open

Problem installing CosmoABC on python 3.8.5 #6

Vokturz opened this issue Nov 4, 2021 · 0 comments

Comments

@Vokturz
Copy link

Vokturz commented Nov 4, 2021

When I'm trying to install CosmoABC, it appears the following error

  ERROR: Command errored out with exit status 1:
   command: /home/vnavarro/anaconda3/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fqzhv3dt
       cwd: /tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/
  Complete output (15 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setuptools/__init__.py", line 2, in <module>
      from setuptools.extension import Extension, Library
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setuptools/extension.py", line 5, in <module>
      from setuptools.dist import _get_unpatched
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setuptools/dist.py", line 7, in <module>
      from setuptools.command.install import install
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setuptools/command/__init__.py", line 8, in <module>
      from setuptools.command import install_scripts
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/setuptools/command/install_scripts.py", line 3, in <module>
      from pkg_resources import Distribution, PathMetadata, ensure_directory
    File "/tmp/pip-install-1dm0o2ph/distribute_535667512149458c8cbea3cedc754e55/pkg_resources.py", line 1518, in <module>
      register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
  AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

This happens for package distribute version 0.7.3

If I try with lower versions other error appears:

ERROR: Command errored out with exit status 1:
   command: /home/vnavarro/anaconda3/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ksbjoab2
       cwd: /tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/
  Complete output (10 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/setuptools/__init__.py", line 2, in <module>
      from setuptools.extension import Extension, Library
    File "/tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/setuptools/extension.py", line 5, in <module>
      from setuptools.dist import _get_unpatched
    File "/tmp/pip-install-1dm0o2ph/distribute_30a6e85c0437451abc3bfdc427e944ec/setuptools/dist.py", line 103
      except ValueError, e:
                       ^
  SyntaxError: invalid syntax

I manage to resolve this issue cloning the repository, removing distribute from install_requires inside setup.py file and then running pip install . for the installation .

Anyway, another error appears when trying to run the toy_model from the examples:

Traceback (most recent call last):

  File "/home/vnavarro/anaconda3/bin/run_ABC.py", line 108, in <module>
    main( args )
  File "/home/vnavarro/anaconda3/bin/run_ABC.py", line 44, in main
    user_input = read_input(args.input)
  File "/home/vnavarro/anaconda3/lib/python3.8/site-packages/cosmoabc/ABC_functions.py", line 77, in read_input
    from distances import distance_GRBF
ModuleNotFoundError: No module named 'distances'

This error is resolved changing line 77 from ABC_functions.py to from .distances import distance_GRBF

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

No branches or pull requests

1 participant