Giter VIP home page Giter VIP logo

pyimmutable's Introduction

pyimmutable

https://travis-ci.org/spacedentist/pyimmutable.svg?branch=master License: MIT

API documentation is hosted on GitHub pages.

Introduction

pyimmutable offers two immutable data types for Python3.6+: a mapping (similar to dict, but, obviously immutable) and a sequence (like list). It is implemented in C++, using the faboulous "immer" library for efficiently implementing the immutable data structures.

When your Python code passes an ImmutableDict or an ImmutableList to some function, you do not have to worry that function may alter the contents of that object. A reference to such an immutable data structure is guaranteed to forever point to the same data. If you do want to change the contents of your data, you have to update the reference. So instead of data["foo"] = "bar" you will have to write data = data.set("foo", "bar"). As a result, your data variable will be updated, but any other variable that referenced data before the change will keep referencing the old data---the one before the update.

Immutable data structures like this allow for some interesting optimization features. For example, two ImmutableDict objects with identical content are not actually two objects but one and the same object, and the same is true for ImmutableList. If any operation returns an ImmutableDict or an ImmutableList that is identical to one that has been constructed earlier, the existing one is returned instead of a new one being constructed. This entails that e.g. two ImmutableDict objects, even if they represent big trees of data, can be compared using the Python is operation.

pyimmutable has a stricter requirement for equality than the usual Python convention. In a nutshell, for pyimmutable, the integer 3 and the float 3.0 are not equal. An ImmutableDict can store different values for the keys 3 and 3.0, whereas a normal Python dict cannot. You can use objects of any type as keys and values, but only identical objects are considered equal. There is an exception to this rule for a small set of built-in types (int, float, str, bytes, tuple---all of which are immutable themselves), which are considered equal when they contain the same data.

Example

>>> from pyimmutable import ImmutableDict
>>> d1 = ImmutableDict()

d1 is an empty immutable dictionary.

>>> d2 = d1.set("foo", "bar")

d2 contains one key ("foo") whose value is "bar". d1 is remains an empty immutable dictionary.

>>> d3 = d2.set("fox", "baz")

d3 now contains two keys ("foo", "fox") with values "bar" and "baz", respectively. d1 and d2 remain unchanged.

>>> d4 = ImmutableDict(foo="bar", fox="baz")

d4 is a newly constructed ImmutableDict, initialized with values foo and fox that happen to be the same as in d3. In such a case, pyimmutable does not actually construct a new ImmutableDict for us, but returns the d3 object from earlier.

>>> d3 is d4
True

This is fine, because ImmutableDict objects are immutable, and since the objects referred to by d3 and d4 can never be mutated and therefore will always have the same contents, d3 and d4 might as well refer to the same object.

pyimmutable's People

Contributors

spacedentist avatar

Watchers

 avatar  avatar

pyimmutable's Issues

Can't install the package with pip

I tried to install the package with pip install pyimmutable and failed with the following error message:

OS: Linux
python version: python 3.9
anaconda3

Using pip 21.2.4 from /home/kabyaam/anaconda3/lib/python3.9/site-packages/pip (python 3.9)
Non-user install because site-packages writeable
Created temporary directory: /tmp/pip-ephem-wheel-cache-n8vkl6b4
Created temporary directory: /tmp/pip-req-tracker-usbmpkyq
Initialized build tracking at /tmp/pip-req-tracker-usbmpkyq
Created build tracker: /tmp/pip-req-tracker-usbmpkyq
Entered build tracker: /tmp/pip-req-tracker-usbmpkyq
Created temporary directory: /tmp/pip-install-loodwqqa
1 location(s) to search for versions of pyimmutable:
* https://pypi.org/simple/pyimmutable/
Fetching project page and analyzing links: https://pypi.org/simple/pyimmutable/
Getting page https://pypi.org/simple/pyimmutable/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pyimmutable/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pyimmutable/ HTTP/1.1" 304 0
  Found link https://files.pythonhosted.org/packages/f5/1c/db64e45828d82811ece18b42021b6f003e1d3b107131ed5ef3590a5a8b6b/pyimmutable-0.1.0.tar.gz#sha256=6d90135dfb2db11e28369507ab24ac23b493b87fd0ea126bdfa0a0599ae80136 (from https://pypi.org/simple/pyimmutable/), version: 0.1.0
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/90/79/71af740ddd8e15b2b766634d951b3d7c7c247da5baa6b3b975dadd038b6e/pyimmutable-0.1.1-py3.7-linux-x86_64.egg#sha256=92249a3bfd4dd90a22e948425af8a6ad29d124bad06e3263cdd6b7738e2b7134 (from https://pypi.org/simple/pyimmutable/)
  Found link https://files.pythonhosted.org/packages/9d/2f/5f29a09131ccbd771ca4b535313f3e3e3725419fe7a20a42b9c80f3021b1/pyimmutable-0.1.1.tar.gz#sha256=af68288349b24b874d39664839d4449bdf90f7e06bf516cde26f1d889e65f249 (from https://pypi.org/simple/pyimmutable/), version: 0.1.1
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/27/9b/08e42c6528397fe9bd591dbae12aad83fef9c22a32845cd9ff14c4eca36a/pyimmutable-0.1.3-py3.7-linux-x86_64.egg#sha256=ec127637677316de72b1fbfd657c58e6af05ba4aaa6b5654cf275567eb05433a (from https://pypi.org/simple/pyimmutable/)
  Found link https://files.pythonhosted.org/packages/a0/07/e38b165fa56f372f2df1515246c8359dab88ec11af7bc120a012c3631c3c/pyimmutable-0.1.3.tar.gz#sha256=8cbf97617606dcd551558d84a8cab1dc4c2b6581f8ed7bca7ad5b8b112e5a962 (from https://pypi.org/simple/pyimmutable/), version: 0.1.3
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/35/94/f4ea1594c86017b4655583e95dc7afbea38e334cd3ed69414b3ba5b02197/pyimmutable-0.1.4-py3.7-linux-x86_64.egg#sha256=b5df42a4323d3c9a96562311529dccec5565d97e728285624cb594f2d9e84f3c (from https://pypi.org/simple/pyimmutable/)
  Found link https://files.pythonhosted.org/packages/5e/f9/2f01496e08d648bfc0a70e666770745daf71e7ea836801070a0397734b22/pyimmutable-0.1.4.tar.gz#sha256=6569f55e2eb3f03981c2d21fcdc1125601bfb5bb7094e6b9bafb5cb36c3ed8e0 (from https://pypi.org/simple/pyimmutable/), version: 0.1.4
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/5a/12/e59838696255020684111c9536247d745a708ba1d0b3dd52d9deda8cf3b8/pyimmutable-0.2.0-py3.7-linux-x86_64.egg#sha256=c84913670adce53245394ad072948630ea3d6b37448c9738f18a8ea18f4cee33 (from https://pypi.org/simple/pyimmutable/)
  Found link https://files.pythonhosted.org/packages/c5/d4/5710c550a3263e7dcd009f88a6a7ca7a1c3ccc19f2efbb4df108e9305f0e/pyimmutable-0.2.0.tar.gz#sha256=2eac567b0863703a8de001316ccde8bddb642516617d37bb70d976fb09b92817 (from https://pypi.org/simple/pyimmutable/), version: 0.2.0
  Skipping link: unsupported archive format: .egg: https://files.pythonhosted.org/packages/5b/72/94cad8212bfb71f63f2013d2193d459697cc3f3965e9a6ed4c8553889a2c/pyimmutable-0.2.1-py3.7-linux-x86_64.egg#sha256=43315bd721018e13889465abb807cc1c5e0e25a10eb42916e3e84deb6a0f9221 (from https://pypi.org/simple/pyimmutable/)
  Found link https://files.pythonhosted.org/packages/e7/aa/1d7cd70c50edba1072fed93640b0b34d56416c18f8953a7c729ccd388b0d/pyimmutable-0.2.1.tar.gz#sha256=35d36ec93b07a92603549039080e5b3e66df6e03d309aa2c8a414126169211ea (from https://pypi.org/simple/pyimmutable/), version: 0.2.1
Skipping link: not a file: https://pypi.org/simple/pyimmutable/
Given no hashes to check 6 links for project 'pyimmutable': discarding no candidates
Collecting pyimmutable
  Created temporary directory: /tmp/pip-unpack-ag_4r0dq
  Looking up "https://files.pythonhosted.org/packages/e7/aa/1d7cd70c50edba1072fed93640b0b34d56416c18f8953a7c729ccd388b0d/pyimmutable-0.2.1.tar.gz" in the cache
  Current age based on date: 136
  Ignoring unknown cache-control directive: immutable
  Freshness lifetime from max-age: 365000000
  The response is "fresh", returning cached response
  365000000 > 136
  Using cached pyimmutable-0.2.1.tar.gz (90 kB)
  Added pyimmutable from https://files.pythonhosted.org/packages/e7/aa/1d7cd70c50edba1072fed93640b0b34d56416c18f8953a7c729ccd388b0d/pyimmutable-0.2.1.tar.gz#sha256=35d36ec93b07a92603549039080e5b3e66df6e03d309aa2c8a414126169211ea to build tracker '/tmp/pip-req-tracker-usbmpkyq'
    Running setup.py (path:/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py) egg_info for package pyimmutable
    Created temporary directory: /tmp/pip-pip-egg-info-6bn7cla5
    Running command python setup.py egg_info
    /home/kabyaam/anaconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
      warnings.warn(
    running egg_info
    creating /tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info
    writing /tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/PKG-INFO
    writing dependency_links to /tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/dependency_links.txt
    writing top-level names to /tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/top_level.txt
    writing manifest file '/tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/SOURCES.txt'
    reading manifest file '/tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files found matching 'cpp/docstrings.autogen.h'
    writing manifest file '/tmp/pip-pip-egg-info-6bn7cla5/pyimmutable.egg-info/SOURCES.txt'
  Source in /tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d has version 0.2.1, which satisfies requirement pyimmutable from https://files.pythonhosted.org/packages/e7/aa/1d7cd70c50edba1072fed93640b0b34d56416c18f8953a7c729ccd388b0d/pyimmutable-0.2.1.tar.gz#sha256=35d36ec93b07a92603549039080e5b3e66df6e03d309aa2c8a414126169211ea
  Removed pyimmutable from https://files.pythonhosted.org/packages/e7/aa/1d7cd70c50edba1072fed93640b0b34d56416c18f8953a7c729ccd388b0d/pyimmutable-0.2.1.tar.gz#sha256=35d36ec93b07a92603549039080e5b3e66df6e03d309aa2c8a414126169211ea from build tracker '/tmp/pip-req-tracker-usbmpkyq'
Created temporary directory: /tmp/pip-unpack-yuwy5b6i
Building wheels for collected packages: pyimmutable
  Created temporary directory: /tmp/pip-wheel-k8vsony5
  Building wheel for pyimmutable (setup.py) ...   Destination directory: /tmp/pip-wheel-k8vsony5
  Running command /home/kabyaam/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-k8vsony5
  /home/kabyaam/anaconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
    warnings.warn(
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/pyimmutable
  copying pyimmutable/__init__.py -> build/lib.linux-x86_64-3.9/pyimmutable
  copying pyimmutable/__version__.py -> build/lib.linux-x86_64-3.9/pyimmutable
  running build_ext
  building '_pyimmutable' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/cpp
  gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/ImmutableDict.cpp -o build/temp.linux-x86_64-3.9/cpp/ImmutableDict.o -std=c++17
  gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/ImmutableList.cpp -o build/temp.linux-x86_64-3.9/cpp/ImmutableList.o -std=c++17
  In file included from cpp/ImmutableList.cpp:25:
  cpp/ImmutableListImpl.h: In lambda function:
  cpp/ImmutableListImpl.h:227:54: warning: narrowing conversion of ‘(long unsigned int)immutable_json_items’ from ‘long unsigned int’ to ‘bool’ [-Wnarrowing]
    227 |                   PyObjectRef{value}, hvalue, hitem, immutable_json_items}),
        |                                                      ^~~~~~~~~~~~~~~~~~~~
  gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/main.cpp -o build/temp.linux-x86_64-3.9/cpp/main.o -std=c++17
  gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/util.cpp -o build/temp.linux-x86_64-3.9/cpp/util.o -std=c++17
  g++ -pthread -B /home/kabyaam/anaconda3/compiler_compat -shared -Wl,-rpath,/home/kabyaam/anaconda3/lib -Wl,-rpath-link,/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib -Wl,-rpath,/home/kabyaam/anaconda3/lib -Wl,-rpath-link,/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib build/temp.linux-x86_64-3.9/cpp/ImmutableDict.o build/temp.linux-x86_64-3.9/cpp/ImmutableList.o build/temp.linux-x86_64-3.9/cpp/main.o build/temp.linux-x86_64-3.9/cpp/util.o -o build/lib.linux-x86_64-3.9/_pyimmutable.cpython-39-x86_64-linux-gnu.so -static-libgcc -static-libstdc++ -Wl,--strip-all
  /home/kabyaam/anaconda3/compiler_compat/ld: cannot find -lstdc++
  collect2: error: ld returned 1 exit status
  error: command '/usr/bin/g++' failed with exit code 1
error
  ERROR: Failed building wheel for pyimmutable
  Running setup.py clean for pyimmutable
  Running command /home/kabyaam/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/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'"'"'))' clean --all
  /home/kabyaam/anaconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
    warnings.warn(
  running clean
  removing 'build/temp.linux-x86_64-3.9' (and everything under it)
  removing 'build/lib.linux-x86_64-3.9' (and everything under it)
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-3.9' does not exist -- can't clean it
  removing 'build'
Failed to build pyimmutable
Installing collected packages: pyimmutable
  Created temporary directory: /tmp/pip-record-8im3s6ms
    Running command /home/kabyaam/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/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'"'"'))' install --record /tmp/pip-record-8im3s6ms/install-record.txt --single-version-externally-managed --compile --install-headers /home/kabyaam/anaconda3/include/python3.9/pyimmutable
    /home/kabyaam/anaconda3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
      warnings.warn(
    running install
    /home/kabyaam/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/pyimmutable
    copying pyimmutable/__init__.py -> build/lib.linux-x86_64-3.9/pyimmutable
    copying pyimmutable/__version__.py -> build/lib.linux-x86_64-3.9/pyimmutable
    running build_ext
    building '_pyimmutable' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/cpp
    gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/ImmutableDict.cpp -o build/temp.linux-x86_64-3.9/cpp/ImmutableDict.o -std=c++17
    gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/ImmutableList.cpp -o build/temp.linux-x86_64-3.9/cpp/ImmutableList.o -std=c++17
    In file included from cpp/ImmutableList.cpp:25:
    cpp/ImmutableListImpl.h: In lambda function:
    cpp/ImmutableListImpl.h:227:54: warning: narrowing conversion of ‘(long unsigned int)immutable_json_items’ from ‘long unsigned int’ to ‘bool’ [-Wnarrowing]
      227 |                   PyObjectRef{value}, hvalue, hitem, immutable_json_items}),
          |                                                      ^~~~~~~~~~~~~~~~~~~~
    gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/main.cpp -o build/temp.linux-x86_64-3.9/cpp/main.o -std=c++17
    gcc -pthread -B /home/kabyaam/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -I/home/kabyaam/anaconda3/include -fPIC -O2 -isystem /home/kabyaam/anaconda3/include -fPIC -Ilib/immer -I/home/kabyaam/anaconda3/include/python3.9 -c cpp/util.cpp -o build/temp.linux-x86_64-3.9/cpp/util.o -std=c++17
    g++ -pthread -B /home/kabyaam/anaconda3/compiler_compat -shared -Wl,-rpath,/home/kabyaam/anaconda3/lib -Wl,-rpath-link,/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib -Wl,-rpath,/home/kabyaam/anaconda3/lib -Wl,-rpath-link,/home/kabyaam/anaconda3/lib -L/home/kabyaam/anaconda3/lib build/temp.linux-x86_64-3.9/cpp/ImmutableDict.o build/temp.linux-x86_64-3.9/cpp/ImmutableList.o build/temp.linux-x86_64-3.9/cpp/main.o build/temp.linux-x86_64-3.9/cpp/util.o -o build/lib.linux-x86_64-3.9/_pyimmutable.cpython-39-x86_64-linux-gnu.so -static-libgcc -static-libstdc++ -Wl,--strip-all
    /home/kabyaam/anaconda3/compiler_compat/ld: cannot find -lstdc++
    collect2: error: ld returned 1 exit status
    error: command '/usr/bin/g++' failed with exit code 1
    Running setup.py install for pyimmutable ... error
ERROR: Command errored out with exit status 1: /home/kabyaam/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/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'"'"'))' install --record /tmp/pip-record-8im3s6ms/install-record.txt --single-version-externally-managed --compile --install-headers /home/kabyaam/anaconda3/include/python3.9/pyimmutable Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 782, in install
    success = install_legacy(
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.py", line 121, in install
    raise LegacyInstallFailure
pip._internal.operations.install.legacy.LegacyInstallFailure

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 390, in run
    installed = install_given_reqs(
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/req/__init__.py", line 73, in install_given_reqs
    requirement.install(
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/req/req_install.py", line 800, in install
    six.reraise(*exc.parent)
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_vendor/six.py", line 719, in reraise
    raise value
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/operations/install/legacy.py", line 109, in install
    runner(
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/utils/subprocess.py", line 274, in runner
    call_subprocess(
  File "/home/kabyaam/anaconda3/lib/python3.9/site-packages/pip/_internal/utils/subprocess.py", line 244, in call_subprocess
    raise InstallationSubprocessError(proc.returncode, command_desc)
pip._internal.exceptions.InstallationSubprocessError: Command errored out with exit status 1: /home/kabyaam/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-loodwqqa/pyimmutable_5ac1e97db1394ee8a0add9b462ef1c2d/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'"'"'))' install --record /tmp/pip-record-8im3s6ms/install-record.txt --single-version-externally-managed --compile --install-headers /home/kabyaam/anaconda3/include/python3.9/pyimmutable Check the logs for full command output.
Removed build tracker: '/tmp/pip-req-tracker-usbmpkyq'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.