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

mac: pip install leads to "NotImplementedError: unsupported platform" #2126

Open
dfielding14 opened this issue Jan 22, 2024 · 8 comments
Open

Comments

@dfielding14
Copy link

After pip installing on my M1 mac I get:

Traceback (most recent call last):
File "/opt/homebrew/bin/changedetection.io", line 5, in
from changedetectionio import main
File "/opt/homebrew/lib/python3.11/site-packages/changedetectionio/init.py", line 10, in
import eventlet
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/init.py", line 6, in
from eventlet import convenience
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/convenience.py", line 7, in
from eventlet.green import socket
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/green/socket.py", line 21, in
from eventlet.support import greendns
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/support/greendns.py", line 78, in
setattr(dns, pkg, import_patched('dns.' + pkg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/support/greendns.py", line 60, in import_patched
return patcher.import_patched(module_name, **modules)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/patcher.py", line 132, in import_patched
return inject(
^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/eventlet/patcher.py", line 109, in inject
module = import(module_name, {}, {}, module_name.split('.')[:-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/dns/asyncquery.py", line 38, in
from dns.query import (
File "/opt/homebrew/lib/python3.11/site-packages/dns/query.py", line 63, in
import httpcore
File "/opt/homebrew/lib/python3.11/site-packages/httpcore/init.py", line 1, in
from ._api import request, stream
File "/opt/homebrew/lib/python3.11/site-packages/httpcore/_api.py", line 5, in
from ._sync.connection_pool import ConnectionPool
File "/opt/homebrew/lib/python3.11/site-packages/httpcore/_sync/init.py", line 1, in
from .connection import HTTPConnection
File "/opt/homebrew/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 10, in
from .._synchronization import Lock
File "/opt/homebrew/lib/python3.11/site-packages/httpcore/_synchronization.py", line 13, in
import trio
File "/opt/homebrew/lib/python3.11/site-packages/trio/init.py", line 22, in
from ._core import TASK_STATUS_IGNORED as TASK_STATUS_IGNORED # isort: split
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/trio/_core/init.py", line 21, in
from ._local import RunVar, RunVarToken
File "/opt/homebrew/lib/python3.11/site-packages/trio/_core/_local.py", line 9, in
from . import _run
File "/opt/homebrew/lib/python3.11/site-packages/trio/_core/_run.py", line 2800, in
raise NotImplementedError("unsupported platform")
NotImplementedError: unsupported platform

Version
0.45.13

To Reproduce
$ pip3 install changedetection.io
$ changedetection.io -d /path/to/empty/data/dir -p 5000

Desktop (please complete the following information):

  • OS: macOS Sonoma version 14.2.1
@dgtlmoon
Copy link
Owner

dgtlmoon commented Jan 22, 2024

ah i see python 3.11 there.. yeah unsupported platform :/ upstream issue, dont think its fixable, lets get more info

@dfielding14
Copy link
Author

OK thanks. Does it work on any macs? I have an intel based Mac I could try

@Constantin1489
Copy link
Contributor

Constantin1489 commented Jan 23, 2024

For intel macOS with Python 3.11.7, it seems not to work.
But when I did some PR on macOS for this repo, that worked with python3.11.
I can say python3.10 works with CD for now.
Maybe try python3.11.6. ( Oh sorry I don't ensure it works with M1 because the log is different than mine. )

Traceback (most recent call last):
  File "/Users/constantinhong/TODO/git-log-msg/repos/ch_reba/changedetection.io/changedetection.py", line 8, in <module>
    from changedetectionio import changedetection
  File "/Users/constantinhong/TODO/git-log-msg/repos/ch_reba/changedetection.io/changedetectionio/changedetection.py", line 8, in <module>
    import eventlet
  File "/usr/local/lib/python3.11/site-packages/eventlet/__init__.py", line 6, in <module>
    from eventlet import convenience
  File "/usr/local/lib/python3.11/site-packages/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/usr/local/lib/python3.11/site-packages/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/usr/local/lib/python3.11/site-packages/eventlet/green/_socket_nodns.py", line 11, in <module>
    from eventlet import greenio
  File "/usr/local/lib/python3.11/site-packages/eventlet/greenio/__init__.py", line 1, in <module>
    from eventlet.greenio.base import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/eventlet/greenio/base.py", line 455, in <module>
    from OpenSSL import SSL
  File "/usr/local/lib/python3.11/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/usr/local/lib/python3.11/site-packages/OpenSSL/crypto.py", line 3279, in <module>
    _lib.OpenSSL_add_all_algorithms()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms

@dgtlmoon
Copy link
Owner

@dfielding14 can you try on your intel based mac and get back to us?

@Constantin1489
Copy link
Contributor

Constantin1489 commented Jan 23, 2024

@dgtlmoon eventlet team changed the policy last week. eventlet/eventlet@7662654

@dgtlmoon dgtlmoon changed the title pip install leads to "NotImplementedError: unsupported platform" mac: pip install leads to "NotImplementedError: unsupported platform" Jan 23, 2024
@dgtlmoon
Copy link
Owner

@Constantin1489 ahh thanks for that, yeah so the fix is still to move to a single threaded gevent #2029

@Constantin1489
Copy link
Contributor

Constantin1489 commented Jan 23, 2024

Yeah actually when Cpython moved to python3.12 development, they changed some code. therefore eventlet and so on are broken on 3.12(of course, python3.12.1(or 2) will temporarily fix it. But the new code will be in python3.13 AFAIK. So the repos of related modules will do some special treat for that.).

See also: eventlet/eventlet#847

@Constantin1489
Copy link
Contributor

Constantin1489 commented Jan 24, 2024

The one with Python3.11.4 on m1 works.

Darwin Mac-mini-constantin.local 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:41:30 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_ARM64_T8103 arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants