Opened 3 years ago
Closed 2 years ago
#65097 closed defect (worksforme)
py38-jinja2 @3.1.2 does not build macOS High Sierra, Version 10.12.6, because: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8: No module named install.__main__; 'install' is a package and cannot be directly executed
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | highsierra | Cc: | |
Port: | py-jinja2 |
Description
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m install --verbose /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2-py3-none-any.whl --destdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/destroot DEBUG: system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m install --verbose /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2-py3-none-any.whl --destdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/destroot /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8: No module named install.__main__; 'install' is a package and cannot be directly executed Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m install --verbose /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2-py3-none-any.whl --destdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/destroot
Attachments (2)
Change History (12)
Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
comment:1 follow-up: 2 Changed 3 years ago by reneeotten (Renee Otten)
Cc: | jmr@… removed |
---|---|
Owner: | set to jmroot |
Port: | py-jinja2 added; py38-jinja2 removed |
Status: | new → assigned |
this is likely related to the other ticket you opened a while back: 64815. However, as both packages appear to build fine on the buildbots (see, for example, https://ports.macports.org/port/py38-build/details/) I am inclined that it's something specific to your system.
Please make sure you have nothing installed through pip
or as a local user, and have not set PYTHONPATH
. Additionally, please try to build in trace-mode (i.e., using the -t
flag) so that nothing else outside of your MacPorts' installation will be picked up and see if that resolves the issue.
comment:2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I do have Python packages installed with pip. Pip knows about this local list:
Package Version ----------------------------- --------- alabaster 0.7.12 ansible 5.6.0 ansible-core 2.12.4 anytree 2.8.0 asciidoc 10.1.3 asn1crypto 1.5.1 attrs 21.4.0 awscli 1.22.97 Babel 2.9.1 bcrypt 3.2.0 Beaker 1.11.0 botocore 1.24.42 build 0.7.0 certifi 2021.10.8 cffi 1.15.0 charset-normalizer 2.0.12 colorama 0.4.4 cryptography 36.0.2 Cython 0.29.28 dblatex 0.3.12rc1 docutils 0.18.1 gnureadline 8.0.0 httplib2 0.20.4 idna 3.3 imagesize 1.3.0 importlib-metadata 4.11.3 importlib-resources 5.4.0 iniconfig 1.1.1 Jinja2 3.1.0 jmespath 1.0.0 jsonschema 4.4.0 libxml2-python 2.9.13 lxml 4.8.0 Mako 1.2.0 Markdown 3.3.6 MarkupSafe 2.1.1 mercurial 6.0.2 meson 0.59.3 mock 4.0.3 netaddr 0.8.0 nose 1.3.7 numpy 1.22.3 packaging 21.3 paramiko 2.10.4 pep517 0.12.0 pip 22.0.4 pluggy 1.0.0 psutil 5.9.0 py 1.11.0 pyasn1 0.4.8 pycparser 2.21 Pygments 2.12.0 PyNaCl 1.5.0 pyparsing 3.0.8 pyrad 2.3 pyre2 0.3.6 pyrsistent 0.18.1 pytest 6.2.5 pytest-mock 3.7.0 python-dateutil 2.8.2 pytz 2022.1 PyYAML 6.0 requests 2.27.1 resolvelib 0.5.4 roman 3.3 rsa 4.8 s3transfer 0.5.2 semantic-version 2.8.5 setuptools 62.1.0 setuptools-rust 0.12.1 setuptools-scm 6.4.2 six 1.16.0 smartypants 2.0.1 snowballstemmer 2.2.0 Sphinx 4.5.0 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 sphinxcontrib-websupport 1.2.4 toml 0.10.2 tomli 2.0.1 typogrify 2.0.7 urllib3 1.26.9 wheel 0.37.1 zipp 3.8.0
and port knows knows about these:
py38-alabaster @0.7.12_0 (active) py38-ansible @5.6.0_0 (active) py38-ansible-core @2.12.4_0 (active) py38-anytree @2.8.0_1 (active) py38-asn1 @0.4.8_0 (active) py38-asn1crypto @1.5.1_0 (active) py38-attrs @21.4.0_0 (active) py38-awscli @1.22.97_0 (active) py38-babel @2.9.1_0 (active) py38-bcrypt @3.2.0_0 (active) py38-beaker @1.11.0_0 (active) py38-botocore @1.24.42_0 (active) py38-build @0.7.0_0 (active) py38-certifi @2021.10.8_0 (active) py38-cffi @1.15.0_0 (active) py38-charset-normalizer @2.0.12_0 (active) py38-colorama @0.4.4_0 (active) py38-cryptography @36.0.2_0 (active) py38-cython @0.29.28_0 (active) py38-dateutil @2.8.2_0 (active) py38-docutils @0.18.1_0 (active) py38-gnureadline @8.0.0_0 (active) py38-httplib2 @2-0.20.4_1 (active) py38-idna @3.3_0 (active) py38-imagesize @1.3.0_0 (active) py38-importlib-metadata @4.11.3_0 (active) py38-importlib-resources @5.4.0_1 (active) py38-iniconfig @1.1.1_0 (active) py38-jinja2 @3.1.0_0 (active) py38-jmespath @1.0.0_0 (active) py38-jsonschema @4.4.0_0 (active) py38-libxml2 @2.9.13_0 (active) py38-lxml @4.8.0_0 (active) py38-mako @1.2.0_0 (active) py38-markdown @3.3.6_0 (active) py38-markupsafe @2.1.1_0 (active) py38-mock @4.0.3_0 (active) py38-netaddr @0.8.0_0 (active) py38-nose @1.3.7_3 (active) py38-numpy @1.22.3_0+gfortran+openblas (active) py38-packaging @21.3_0 (active) py38-paramiko @2.10.4_0 (active) py38-parsing @3.0.8_0 (active) py38-pep517 @0.12.0_0 (active) py38-pip @22.0.4_0 (active) py38-pluggy @1.0.0_0 (active) py38-psutil @5.9.0_0 (active) py38-py @1.11.0_0 (active) py38-pycparser @2.21_0 (active) py38-pygments @2.12.0_0 (active) py38-pynacl @1.5.0_0 (active) py38-pyrsistent @0.18.1_0 (active) py38-pytest @6.2.5_0 (active) py38-pytest-mock @3.7.0_0 (active) py38-python-install @0.0.3_5 (active) py38-rad @2.3_0 (active) py38-requests @2.27.1_0 (active) py38-resolvelib @0.5.4_0 (active) py38-roman @3.3_0 (active) py38-rsa @4.8_0 (active) py38-s3transfer @0.5.2_0 (active) py38-semantic_version @2.8.5_0 (active) py38-setuptools @62.1.0_0 (active) py38-setuptools-rust @0.12.1_0 (active) py38-setuptools_scm @6.4.2_0 (active) py38-six @1.16.0_0 (active) py38-snowballstemmer @2.2.0_0 (active) py38-sphinx @4.5.0_0 (active) py38-sphinxcontrib-applehelp @1.0.2_0 (active) py38-sphinxcontrib-devhelp @1.0.2_0 (active) py38-sphinxcontrib-htmlhelp @2.0.0_0 (active) py38-sphinxcontrib-jsmath @1.0.1_1 (active) py38-sphinxcontrib-qthelp @1.0.3_0 (active) py38-sphinxcontrib-serializinghtml @1.1.5_0 (active) py38-sphinxcontrib-websupport @1.2.4_0 (active) py38-toml @0.10.2_0 (active) py38-tomli @2.0.1_0 (active) py38-tz @2022.1_0 (active) py38-urllib3 @1.26.9_0 (active) py38-wheel @0.37.1_0 (active) py38-yaml @6.0_0 (active) py38-zipp @3.8.0_0 (active)
I do not know of a means to match the port names with the proper names pip uses… (I needed to install a few with pip because port does not provide them)
Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | main.2.log added |
---|
Main.log from High Sierra 10.13.6 with trace on
comment:3 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I tried to upgrade py38-jinja2
via the command port -vdst upgrade py38-jinja2
– is this correct?
I also counted the Python packages port and pip know as installed (probably). Port knows of 82 and pip of 88. So there must be six Python packages that were installed with pip.
comment:4 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
Using the version numbers it's possible that these packages are installed via pip:
asciidoc 10.1.3 dblatex 0.3.12rc1 httplib2 0.20.4 meson 0.59.3 pyre2 0.3.6 typogrify 2.0.7
By chance they are exactly six…
comment:5 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I reduced the difference in count to presuming these two by pip installed Python packages:
pyre2 0.3.6 typogrify 2.0.7
comment:6 follow-up: 8 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I uninstalled and then re-installed the four other packages with port. When I now try to upgrade py38-jinja2
I still get:
Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work DEBUG: system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 390, in <module> main(sys.argv[1:], 'python -m build') File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 337, in main _setup_cli() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 71, in _setup_cli colorama.init() # fix colors on windows AttributeError: module 'colorama' has no attribute 'init' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work Exit code: 1 Warning: The following existing file was hidden from the build system by trace mode: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/colorama/__init__.py Error: Failed to build py38-jinja2: command execution failed
So I also uninstalled and re-installed py38-colorama. This does not change anything. BTW, I often see this warning:
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
comment:7 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I uninstalled a lot of leaves, rev-upgrade showed that gdb needed to be rebuilt. After this upgrading py38-jinja2 still fails.
comment:8 Changed 3 years ago by reneeotten (Renee Otten)
Replying to ballapete:
We recommend to stick with one way of installing packages, either through MacPorts or using pip
and avoid mixing/matching as this often leads to problems that are difficult to diagnose....
Additionally, please make sure you have no packages installed in your local user directory (e.g., /Users/<username>/Library/Python/3.8/lib/python/site-packages/
) that could possibly interfere.
I uninstalled and then re-installed the four other packages with port. When I now try to upgrade
py38-jinja2
I still get:Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work DEBUG: system: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 390, in <module> main(sys.argv[1:], 'python -m build') File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 337, in main _setup_cli() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/build/__main__.py", line 71, in _setup_cli colorama.init() # fix colors on windows AttributeError: module 'colorama' has no attribute 'init' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work/Jinja2-3.1.2" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m build --wheel --no-isolation --outdir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-jinja2/py38-jinja2/work Exit code: 1 Warning: The following existing file was hidden from the build system by trace mode: /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/colorama/__init__.py Error: Failed to build py38-jinja2: command execution failedSo I also uninstalled and re-installed py38-colorama. This does not change anything.
that's a different problem than you mention when you opened this ticket. The problem you have no is actually due to building in trace-mode, that doesn't work properly with the PEP517 build tools. It tries to import the colorama
module and that fails because the port doesn't declare a dependency on it - which it shouldn't as that is only needed on Windows. The issue appears that the test whether the module is available works in trace-mode, but then the actual usage doesn't. That's on my to-do list to take a closer look... at this stage, please try again without trace mode and see if that works now.
BTW, I often see this warning:
> /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
That's just a deprecation warning for setuptools - these can be ignored for now..
comment:9 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)
I decided to move on and, since I could not find dependencies of Python 3.8, switched to Python 3.9, wich is closer to Python 3.10.
comment:10 Changed 2 years ago by reneeotten (Renee Otten)
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
Main.log from High Sierra 10.13.6