pyDatalog
pyDatalog copied to clipboard
Changes have to be made in order to support Python 3.10
In python 3.10 MutableSequence was removed from collections
in favor of collections.abc
So, while installing pyDatalog using pip install pyDatalog
, it gives an error like
× python setup.py egg_info did not run successfully. │ exit code: 1
In order to fix this, please update the file: "\pyDatalog\UserList.py" in the following way:
At line 5, replace UserList(collections.MutableSequence):
with UserList(collections.abc.MutableSequence):
pip3 install pyDatalog
Defaulting to user installation because normal site-packages is not writeable
Collecting pyDatalog
Using cached pyDatalog-0.17.1.zip (304 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-v4tjlfin
cwd: /tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/setup.py", line 167, in <module>
from pyDatalog import version as VERSION
File "/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/pyDatalog/__init__.py", line 3, in <module>
from . import Logic
File "/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/pyDatalog/Logic.py", line 26, in <module>
from . import pyEngine, pyParser
File "/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/pyDatalog/pyParser.py", line 69, in <module>
from . import UserList
File "/tmp/pip-install-uunswdto/pydatalog_4e233ec5f8e1462b9686cd62110cb9c3/pyDatalog/UserList.py", line 5, in <module>
class UserList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/09/0b/2670eb9c0027aacfb5b5024ca75e5fee2f1261180ab8797108ffc941158a/pyDatalog-0.17.1.zip#sha256=b3d9cff0b9431e0fd0b2d5eefe4414c3d3c20bd18fdd7d1b42b2f01f25bac808 (from https://pypi.org/simple/pydatalog/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyDatalog-0.17.0.zip (304 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-i9yfyjv6
cwd: /tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/setup.py", line 167, in <module>
from pyDatalog import version as VERSION
File "/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/pyDatalog/__init__.py", line 3, in <module>
from . import Logic
File "/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/pyDatalog/Logic.py", line 26, in <module>
from . import pyEngine, pyParser
File "/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/pyDatalog/pyParser.py", line 69, in <module>
from . import UserList
File "/tmp/pip-install-uunswdto/pydatalog_9620bc59e75047d7b386954ca0f47bed/pyDatalog/UserList.py", line 5, in <module>
class UserList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bf/55/fd253f4d90245d5b331d93183dd9e3737a2447ba6db0a86744040c9d96b5/pyDatalog-0.17.0.zip#sha256=74d4c1ffa97177ca57db120c3b5e7c29ed064bec71b087f52079ef6f6a42eaa4 (from https://pypi.org/simple/pydatalog/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyDatalog-0.16.0.zip (295 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-b84fb26n
cwd: /tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/setup.py", line 88, in <module>
from pyDatalog import version
File "/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/pyDatalog/__init__.py", line 3, in <module>
from . import Logic
File "/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/pyDatalog/Logic.py", line 26, in <module>
from . import pyEngine, pyParser
File "/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/pyDatalog/pyParser.py", line 69, in <module>
from . import UserList
File "/tmp/pip-install-uunswdto/pydatalog_4d05e4243cfc44b88c697b6d5bb6ec02/pyDatalog/UserList.py", line 5, in <module>
class UserList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e3/3a/d6421b47d7de03553fc08ad5e9de889dee27f9957ab88c13241c77125a18/pyDatalog-0.16.0.zip#sha256=935db2398be6cd903b15d6d6bde20fa977fe42c2666e773b7382ded345532447 (from https://pypi.org/simple/pydatalog/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyDatalog-0.15.2.zip (273 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-rkmo952b
cwd: /tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/setup.py", line 88, in <module>
from pyDatalog import version
File "/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/pyDatalog/__init__.py", line 3, in <module>
from . import Logic
File "/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/pyDatalog/Logic.py", line 26, in <module>
from . import pyEngine, pyParser
File "/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/pyDatalog/pyParser.py", line 69, in <module>
from . import UserList
File "/tmp/pip-install-uunswdto/pydatalog_7682e303f5084d05b642833cd0c3d561/pyDatalog/UserList.py", line 5, in <module>
class UserList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/cc/ce/6f00df99b8e217b3bde65192519eaaab546a7e869d87896eea343f5bf8c9/pyDatalog-0.15.2.zip#sha256=d1efe70e22daa765e7028dd06216f3d502dcb28fe8fe6cc12a52b196304479f6 (from https://pypi.org/simple/pydatalog/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyDatalog-0.15.1.zip (273 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-svgp1432
cwd: /tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/
Complete output (13 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/setup.py", line 88, in <module>
from pyDatalog import version
File "/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/pyDatalog/__init__.py", line 3, in <module>
from . import Logic
File "/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/pyDatalog/Logic.py", line 26, in <module>
from . import pyEngine, pyParser
File "/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/pyDatalog/pyParser.py", line 69, in <module>
from . import UserList
File "/tmp/pip-install-uunswdto/pydatalog_b38c441862f44e33a6c363d9b4a04200/pyDatalog/UserList.py", line 5, in <module>
class UserList(collections.MutableSequence):
AttributeError: module 'collections' has no attribute 'MutableSequence'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/8f/25/b77508bce765fed31ebe43ab5ed14620fca6bcd0b3b9a94478b451dee0d8/pyDatalog-0.15.1.zip#sha256=2952cd8a7ca09b7e351c1b958acf9ab21674c186ce760bcd8b4da9a4da41b06e (from https://pypi.org/simple/pydatalog/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached pyDatalog-0.15.0.zip (273 kB)
ERROR: pyDatalog from https://files.pythonhosted.org/packages/d0/75/9aa72ce9bacad41336d033bf189f930c32c02a22cc6179f6be0b17419b4b/pyDatalog-0.15.0.zip#sha256=c87b0510aff677183570ddcbc3e6322ccd0c829cf37fa41d76b41296f6a3dd50 does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
Same issues happening for me in fedora 36 with the python3 version 3.10.5 and pip3 version 21.3.1
@pcarbonn Will you accept a patch for this? I would love to take my project to Python 3.10
Ummh. The change is easy to do in the source code. The problem is that I do not have the build environment to create all the wheels. And pip has changed a lot since then.
@pcarbonn Please forgive my question since I'm relatively new to the distribution side of Python. This package doesn't involve any native code (right?) so why isn't distribution a simple matter of packaging the source code?
The /pyDatalog/pyengine.py
module should be compiled using cython for better performance.
My /create_dist.bat
batch file creates wheels with the compiled package, but I'm on Ubuntu now, and can't run it anymore. It probably needs updating to the latest pip too.
Would like to pile up on this request for updating to python > 3.10. Maybe you could provide a warning on the installation page, an perhaps also an explicit set of instructions for building the code from source on > 3.10? I understand that you may be on other projects but I think that it would be a crying shame if all the wonderful work that you have done go unused because of a single line of code. Thanks! and please let the community know how can we explicitly help to update this code.
I have now discovered cibuildwheel
to create the wheels for the various platforms.
This has allowed me to release v0.17.3 on pypi: please let me know if it works.
(Somehow, I've lost the README file on pypi; not sure why).
LOVE IT!!! Confirmed on python 3.10.0 and Ubuntu 20.04.5. Thank you!!!
╰─(pandalog-1bvXT_KZ) ⠠⠵ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
(pandalog) ╭─acortis at NCC-1701 in ~/my_codes/pandalog on master✘✘✘ 22-11-26 - 15:36:02
╰─(pandalog-1bvXT_KZ) ⠠⠵ python
Python 3.10.0 (default, Nov 13 2021, 08:27:52) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyDatalog import pyDatalog
>>>