question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pythonnet 3.0.0 is missing python_requires metadata, installs on 3.6

See original GitHub issue

Environment

  • Pythonnet version: 3.0.0
  • Python version: 3.6.8
  • Operating System: Windows 10

Details

  • Describe what you were trying to get done.

Pythonnet 3.0.0 is missing python_requires metadata (https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#python-requires) which means that pip will choose this version even with python versions that are not supported.

This creates challenges for owners and users of Python packages that use pythonnet, and still need to support/use Python 3.6.

The following should install pythonnet 2.x but it installs 3.0.0.

$ python3.6 -m pip install pythonnet
  • If there was a crash, please include the traceback here.
$ python3.6 -c "import pythonnet"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Python36\lib\site-packages\pythonnet\__init__.py", line 6, in <module>
    import clr_loader
  File "C:\Python36\lib\site-packages\clr_loader\__init__.py", line 5, in <module>
    from .types import Assembly, Runtime, RuntimeInfo
  File "C:\Python36\lib\site-packages\clr_loader\types.py", line 2, in <module>
    from dataclasses import dataclass, field
ModuleNotFoundError: No module named 'dataclasses'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
filmorcommented, Sep 29, 2022

I pushed it as a post release to keep the version (no code change required).

1reaction
filmorcommented, Sep 29, 2022

I’ll yank the existing version and cut a 3.0.1 from master. This will also break for Python 3.11, as the current version doesn’t work with it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix error during pythonnet installation
So, the command line should be: python -m pip install --pre pythonnet . Or specify the version directly: pip install pythonnet==3.0.0rc6 . On ......
Read more >
Unable to install pythonnet for Python 3.6.6 on Ubuntu 18.04
Describe what you were trying to get done. I wanted to install pythonnet. ... this will help us understand the issue. $ pip...
Read more >
PIP Install Pythonnet - A quick read
Try a faster and easier way to work with Python packages and libraries, and building from source. Use Python 3.9 by ActiveState and...
Read more >
pythonnet
Python.NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful ...
Read more >
importlib.metadata – Accessing package metadata
importlib.metadata is a library that provides access to the metadata of an installed Distribution Package, such as its entry points or its top-level...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found