Opened 3 months ago
Closed 3 months ago
#70562 closed defect (worksforme)
py310-cython-compat 0.29.37_0.darwin_23.arm64: no module named Cython
Reported by: | areilly | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.0 |
Keywords: | Cc: | jmroot (Joshua Root) | |
Port: | py310-cython-compat |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
The port installs cleanly, but does not work. It doesn't install the executables into the /opt/local/bin directory, but into /opt/local/lib/py310-cython-compat/bin/, and when executed directly from there produces the unhelpful error:
Traceback (most recent call last): File "/opt/local/bin/cython", line 5, in <module> from Cython.Compiler.Main import setuptools_main ModuleNotFoundError: No module named 'Cython'
If I also install py310-cython, I do get cython in /opt/local/bin but that is the latest version:
% cython --version Cython version 3.0.10
Now /opt/local/lib/py310-cython-compat/bin/cython does run, but it runs the new version:
% /opt/local/lib/py310-cython-compat/bin/cython --version Cython version 3.0.10
I need the old version to get the py310-grpcio port to build, apparently: https://github.com/grpc/grpc/blob/42284424acd2ba4ba649599984592f5d2eade919/requirements.txt says cython>=0.29.8,<3.0.0rc1
Macports appears to be able to install this, it just doesn't find or use it.
Change History (3)
comment:1 Changed 3 months ago by jmroot (Joshua Root)
Milestone: | MacPorts Future |
---|
comment:2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:3 Changed 3 months ago by jmroot (Joshua Root)
Cc: | jmroot added |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
As the port description says, this exists mainly "for the use of ports that are not compatible with the current version". It's not really intended to be used from outside of Portfiles. It's unfortunately not possible to install multiple versions of a python module side-by-side, so to use this older version requires prepending to sys.path, usually via PYTHONPATH. See for example what py-h5py or py-yaml does: