brunoscherrer / retraites

simulateur du COR amélioré
GNU General Public License v3.0
25 stars 8 forks source link

Installation échoue sous OSX 10.13.6 #11

Closed josephmure closed 4 years ago

josephmure commented 4 years ago

Je viens d'essayer d'installer la librairie sur l'ordinateur de quelqu'un qui possède un MAC (OS X version 10.13.6). J'ai suivi la méthode indiquée dans le readme :

git clone https://github.com/brunoscherrer/retraites.git
cd retraites
python setup.py install

Au moment du clonage, la branche master est au commit 53fa76e. La dernière commande échoue, pourtant Python 2.7 est bien installé

$ python --version
Python 2.7.13

Le message d'erreur est le suivant

$ python setup.py install
Download error on https://pypi.python.org/simple/pytest-runner/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) -- Some packages may not be found!
Couldn't find index page for 'pytest-runner' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:661) -- Some packages may not be found!
No local packages or working download links found for pytest-runner
Traceback (most recent call last):
  File "setup.py", line 65, in <module>
    url="https://github.com/brunoscherrer/retraites",
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
    replace_conflicting=True,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
    return self.obtain(req, installer)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
    return installer(requirement)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
    return cmd.easy_install(req)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pytest-runner')
mbaudin47 commented 4 years ago

Le site existe pourtant :

Screenshot from 2020-02-13 14-34-19

Le module pytest-runner n'existe peut-être pas pour Mac. Est-il strictement nécessaire pour le module retraites ?

josephmure commented 4 years ago

En effet, les scripts test_etudeimpact.py et test_retraites.py utilisent unittest et non pytest.

mbaudin47 commented 4 years ago

unittest est dans Python et ne nécessite donc pas de module supplémentaire :

https://docs.python.org/3/library/unittest.html

mbaudin47 commented 4 years ago

Je me charge de corriger cela.