2

I recently tried to use py2app and I have a simple app named test.py. everything is fine, until I type 'python3 setup.py py2app'. here is the error message:

Download error on https://pypi.python.org/simple/py2app/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found! Couldn't find index page for 'py2app' (maybe misspelled?) Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748) -- Some packages may not be found! No local packages or working download links found for py2app Traceback (most recent call last): File "setup.py", line 18, in setup_requires=['py2app'], File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup _setup_distribution = dist = klass(attrs) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/setuptools/dist.py", line 315, in init self.fetch_build_eggs(attrs['setup_requires']) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs replace_conflicting=True, File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/pkg_resources/init.py", line 850, in resolve dist = best[req.key] = env.best_match(req, ws, installer) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/pkg_resources/init.py", line 1122, in best_match return self.obtain(req, installer) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/pkg_resources/init.py", line 1134, in obtain return installer(requirement) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/site-packages/setuptools/dist.py", line 429, in fetch_build_egg return cmd.easy_install(req) File "/Users/dariushmazlumi/Desktop/test/lib/python3.6/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('py2app')

I'm using python3.6 on macOS sierra.

  • 1
    Checkout this question it might have your answer https://stackoverflow.com/questions/42509902/ssl-certificate-verify-failed-using-pip-to-install-packages – WombatPM Aug 31 '17 at 18:12
  • thank's @WombatPM; there are three answers. first only work's, but it doesn't solve my problem(I can install, but some things like py2app doesn't work!), second answer was 'certifi'. I installed but it doesn't work. I didn't try the third one, but also it will not solve my problem, maybe it will just work, like first one. –  Aug 31 '17 at 18:18
  • also, thank you @BillBEGUERADJ for your edits –  Aug 31 '17 at 18:29
  • Thanks for that link @WombatPM , doing `pip install --trusted-host pypi.python.org py2app` in my virtualenv solved it for me. – A__ Apr 29 '18 at 00:22

2 Answers2

1

There is a reported python bug that was caused by Apple no longer installing open SSL. See this discussion.

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
WombatPM
  • 2,561
  • 2
  • 22
  • 22
  • thanks @WombatPM! how can I run /Applications/Python 3.6/Install Certificates.command according to https://bugs.python.org/issue28150? –  Aug 31 '17 at 18:25
  • hello?@WombatPM? –  Aug 31 '17 at 18:29
  • I ran it by sudo ../../Applications/Python 3.6/Install\ Certificates.command! let my try py2app and pip3! –  Aug 31 '17 at 18:35
  • maybe rebooting! –  Aug 31 '17 at 18:36
  • ): its not working! still that error. –  Aug 31 '17 at 18:55
  • I found out something, this error message is because setup tools in setup.py, it want to use easy_install, to install something, and certificate error happens. –  Aug 31 '17 at 20:06
  • it was py2app. but even when I install py2app in my virtual environment, an other error happens. I ran something else in my test.app (via terminal): no module named tkinter ): (I have it installed in my mac) –  Aug 31 '17 at 20:09
0

after a week trying to fix my problem, I found out why my py2app, pip, and ... are not working. it is my antivirus(Kaspersky) problem. today, when opening google.com, I understand that I had a problem opening any page. I had same problem on other browsers. I read that error message in safari. Kaspersky issued all certificates!(including pip,py2app ...) I fixed it by disabling: kaspersky internet security > preference > protection > check secure connections(https). thanks everyone for their help.