Git Product home page Git Product logo

accumulation_tree's People

Contributors

tkluck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

accumulation_tree's Issues

install failed 3.8.2

mac Catalina 10.15.6
pip install --upgrade --no-cache accumulation-tree

Possibly related to:
https://cmichel.io/fixing-cpp-compilation-bugs-for-the-mac-os-catalina-upgrade/

ERROR: Command errored out with exit status 1:
  command: /Users/petercotton/virtual-envs/rediz/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-install-40gbkare/accumulation-tree_d19174c82d2d4d04b65826db3569fbc1/setup.py'"'"'; __file__='"'"'/private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-install-40gbkare/accumulation-tree_d19174c82d2d4d04b65826db3569fbc1/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 /private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-record-ll6u0es9/install-record.txt --single-version-externally-managed --compile --install-headers /Users/petercotton/virtual-envs/rediz/include/site/python3.8/accumulation-tree
      cwd: /private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-install-40gbkare/accumulation-tree_d19174c82d2d4d04b65826db3569fbc1/
 Complete output (114 lines):
 running install
 running build
 running build_py
 creating build
 creating build/lib.macosx-10.14.6-x86_64-3.8
 creating build/lib.macosx-10.14.6-x86_64-3.8/accumulation_tree
 copying accumulation_tree/treeslice.py -> build/lib.macosx-10.14.6-x86_64-3.8/accumulation_tree
 copying accumulation_tree/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/accumulation_tree
 copying accumulation_tree/abctree.py -> build/lib.macosx-10.14.6-x86_64-3.8/accumulation_tree
 running build_ext
 skipping 'accumulation_tree/accumulation_tree.c' Cython extension (up-to-date)
 building 'accumulation_tree.accumulation_tree' extension
 creating build/temp.macosx-10.14.6-x86_64-3.8
 creating build/temp.macosx-10.14.6-x86_64-3.8/accumulation_tree
 clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/[email protected]/include -I/Users/petercotton/virtual-envs/rediz/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c accumulation_tree/accumulation_tree.c -o build/temp.macosx-10.14.6-x86_64-3.8/accumulation_tree/accumulation_tree.o
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
 In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/limits.h:63:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
 #error Unsupported architecture
  ^
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:11:
 In file included from /Library/Developer/CommandLineTools/usr/lib/clang/12.0.0/include/limits.h:21:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/limits.h:64:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/limits.h:8:2: error: architecture not supported
 #error architecture not supported
  ^
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
 #error architecture not supported
  ^
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
         ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
 typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
         ^
 note: '__int128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
 typedef __int32_t       __darwin_dev_t;         /* dev_t */
         ^
 note: '__int128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
         ^
 note: '__uint128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
         ^
 note: '__uint128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
 typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
         ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
 typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
         ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
 typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
         ^
 note: '__uint128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
 typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
         ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
 typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
         ^
 note: '__int128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
         ^
 note: '__uint128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
 typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
         ^
 note: '__int128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
         ^
 note: '__uint128_t' declared here
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
         ^
 note: '__uint128_t' declared here
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
 typedef __uint32_t      __darwin_wctype_t;
         ^
 note: '__uint128_t' declared here
 In file included from accumulation_tree/accumulation_tree.c:16:
 In file included from /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
 In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
 #error architecture not supported
  ^
 fatal error: too many errors emitted, stopping now [-ferror-limit=]
 20 errors generated.
 error: command 'clang' failed with exit status 1
 ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/petercotton/virtual-envs/rediz/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-install-40gbkare/accumulation-tree_d19174c82d2d4d04b65826db3569fbc1/setup.py'"'"'; __file__='"'"'/private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-install-40gbkare/accumulation-tree_d19174c82d2d4d04b65826db3569fbc1/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 /private/var/folders/g2/6p5lz9hn36vbnv165bk7yj7r0000gn/T/pip-record-ll6u0es9/install-record.txt --single-version-externally-managed --compile --install-headers /Users/petercotton/virtual-envs/rediz/include/site/python3.8/accumulation-tree Check the logs for full command output.

Add Wheel

Summary

There's currently two engineers I work with having trouble installing a library because of accumulation tree build error. The root cause is probably something about their environment, but searching has found me little useful and difficult to debug when I can't locally reproduce it. It'd be helpful if this package included a wheel in releases to make it easier to install.

The error message they have is,

Running command python setup.py egg_info
    running egg_info
    creating /private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info
    writing /private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/PKG-INFO
    writing dependency_links to /private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/dependency_links.txt
    writing top-level names to /private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/top_level.txt
    writing manifest file '/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/SOURCES.txt'
    reading manifest file '/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/SOURCES.txt'
    writing manifest file '/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-pip-egg-info-r_n92m9w/accumulation_tree.egg-info/SOURCES.txt'
  Running command /Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-install-7deytqi5/accumulation-tree_9d95b6baa0994cfbbce2c8813e96ccc2/setup.py'"'"'; __file__='"'"'/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-install-7deytqi5/accumulation-tree_9d95b6baa0994cfbbce2c8813e96ccc2/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 /private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-wheel-d1ur5c6f
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-install-7deytqi5/accumulation-tree_9d95b6baa0994cfbbce2c8813e96ccc2/setup.py", line 4, in <module>
      setup(
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
      _install_setup_requires(attrs)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
      dist.fetch_build_eggs(dist.setup_requires)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/dist.py", line 806, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/pkg_resources/__init__.py", line 766, in resolve
      dist = best[req.key] = env.best_match(
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1051, in best_match
      return self.obtain(req, installer)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1063, in obtain
      return installer(requirement)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/dist.py", line 877, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/installer.py", line 80, in fetch_build_egg
      wheel.install_as_egg(dist_location)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/wheel.py", line 95, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/wheel.py", line 103, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "/Users/abarnwal/.pyenv/versions/3.8.7/envs/barista/lib/python3.8/site-packages/setuptools/wheel.py", line 124, in _convert_metadata
      os.mkdir(destination_eggdir)
  FileExistsError: [Errno 17] File exists: '/private/var/folders/vz/cl541ty950s550dfgt042mkh0000gp/T/pip-install-7deytqi5/accumulation-tree_9d95b6baa0994cfbbce2c8813e96ccc2/.eggs/Cython-0.29.24-py3.8-macosx-11.6-x86_64.egg'
  ERROR: Failed building wheel for accumulation-tree

Solving the specific error would be nice, but I think wheel is a better solution then debugging build errors like this for each weird environment.

Accumulation Tree causing build error

How can I go about the same?

`
Building wheels for collected packages: hurry.filesize, accumulation-tree, pyudorandom
Building wheel for hurry.filesize (setup.py) ... done
Created wheel for hurry.filesize: filename=hurry.filesize-0.9-py3-none-any.whl size=4140 sha256=f58e0be472b8270b98a1486e1b30122257820fa20d5cfe4b52a4455588d7b1c7
Stored in directory: c:\users\ipl\appdata\local\pip\cache\wheels\28\4e\4f\de74e961eaf2cc15974f0d7a9c73515860843923bd3700bee6
Building wheel for accumulation-tree (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\IPL\anaconda3\envs\flare_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"'; file='"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\IPL\AppData\Local\Temp\pip-wheel-gvfw3da2'
cwd: C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree\abctree.py -> build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree\treeslice.py -> build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree_init_.py -> build\lib.win-amd64-3.6\accumulation_tree
running build_ext
cythoning accumulation_tree/accumulation_tree.pyx to accumulation_tree\accumulation_tree.c
c:\users\ipl\appdata\local\temp\pip-install-swpip_rv\accumulation-tree.eggs\cython-0.29.21-py3.6-win-amd64.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\accumulation_tree\accumulation_tree.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
building 'accumulation_tree.accumulation_tree' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Failed building wheel for accumulation-tree
Running setup.py clean for accumulation-tree
Building wheel for pyudorandom (setup.py) ... done
Created wheel for pyudorandom: filename=pyudorandom-1.0.0-py3-none-any.whl size=2230 sha256=86f94b46021772593ca4191830581ae6e1fd07b836aca6768ac5ecdbbb3eb246
Stored in directory: c:\users\ipl\appdata\local\pip\cache\wheels\6a\1c\44\a36680940ed50318768af5bd3d414088188e90179ad33c8a45
Successfully built hurry.filesize pyudorandom
Failed to build accumulation-tree
Installing collected packages: hurry.filesize, accumulation-tree, pyudorandom, tdigest, mvtsdatatoolkit
Running setup.py install for accumulation-tree ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\IPL\anaconda3\envs\flare_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"'; file='"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\IPL\AppData\Local\Temp\pip-record-67vct1pd\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\IPL\anaconda3\envs\flare_env\Include\accumulation-tree'
cwd: C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree
Complete output (13 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree\abctree.py -> build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree\treeslice.py -> build\lib.win-amd64-3.6\accumulation_tree
copying accumulation_tree_init_.py -> build\lib.win-amd64-3.6\accumulation_tree
running build_ext
skipping 'accumulation_tree\accumulation_tree.c' Cython extension (up-to-date)
building 'accumulation_tree.accumulation_tree' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/

ERROR: Command errored out with exit status 1: 'C:\Users\IPL\anaconda3\envs\flare_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"'; file='"'"'C:\Users\IPL\AppData\Local\Temp\pip-install-swpip_rv\accumulation-tree\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\IPL\AppData\Local\Temp\pip-record-67vct1pd\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\IPL\anaconda3\envs\flare_env\Include\accumulation-tree' Check the logs for full command output.
`

Cannot build on Python 3.7

It seems that CPython API has changed in the recent release of Python 3.7, I cannot install this package anymore:

  Running setup.py install for accumulation-tree ... error
    Complete output from command /home/vagrant/.pyenv/versions/3.7.0/envs/tt/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ekheu36f/accumulation-tree/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-9lhsejzq/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/.pyenv/versions/3.7.0/envs/tt/include/site/python3.7/accumulation-tree:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/accumulation_tree
    copying accumulation_tree/treeslice.py -> build/lib.linux-x86_64-3.7/accumulation_tree
    copying accumulation_tree/abctree.py -> build/lib.linux-x86_64-3.7/accumulation_tree
    copying accumulation_tree/__init__.py -> build/lib.linux-x86_64-3.7/accumulation_tree
    running build_ext
    skipping 'accumulation_tree/accumulation_tree.c' Cython extension (up-to-date)
    building 'accumulation_tree.accumulation_tree' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/accumulation_tree
    ccache /usr/bin/cc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/home/vagrant/.pyenv/versions/3.7.0/envs/tt/include -I/home/vagrant/.pyenv/versions/3.7.0/include/python3.7m -c accumulation_tree/accumulation_tree.c -o build/temp.linux-x86_64-3.7/accumulation_tree/accumulation_tree.o
    accumulation_tree/accumulation_tree.c: In function ‘__Pyx_PyCFunction_FastCall’:
    accumulation_tree/accumulation_tree.c:9771:13: error: too many arguments to function ‘(PyObject * (*)(PyObject *, PyObject * const*, Py_ssize_t))meth’
         return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs, NULL);
                ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    accumulation_tree/accumulation_tree.c: In function ‘__Pyx__GetException’:
    accumulation_tree/accumulation_tree.c:10138:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    accumulation_tree/accumulation_tree.c:10139:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    accumulation_tree/accumulation_tree.c:10140:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    accumulation_tree/accumulation_tree.c:10141:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = local_type;
                 ^~~~~~~~
                 curexc_type
    accumulation_tree/accumulation_tree.c:10142:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = local_value;
                 ^~~~~~~~~
                 curexc_value
    accumulation_tree/accumulation_tree.c:10143:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = local_tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    accumulation_tree/accumulation_tree.c: In function ‘__Pyx__ExceptionSwap’:
    accumulation_tree/accumulation_tree.c:10165:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    accumulation_tree/accumulation_tree.c:10166:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    accumulation_tree/accumulation_tree.c:10167:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    accumulation_tree/accumulation_tree.c:10168:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = *type;
                 ^~~~~~~~
                 curexc_type
    accumulation_tree/accumulation_tree.c:10169:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = *value;
                 ^~~~~~~~~
                 curexc_value
    accumulation_tree/accumulation_tree.c:10170:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = *tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    accumulation_tree/accumulation_tree.c: In function ‘__Pyx__ExceptionSave’:
    accumulation_tree/accumulation_tree.c:10189:21: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         *type = tstate->exc_type;
                         ^~~~~~~~
                         curexc_type
    accumulation_tree/accumulation_tree.c:10190:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         *value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
    accumulation_tree/accumulation_tree.c:10191:19: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         *tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
    accumulation_tree/accumulation_tree.c: In function ‘__Pyx__ExceptionReset’:
    accumulation_tree/accumulation_tree.c:10198:24: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tmp_type = tstate->exc_type;
                            ^~~~~~~~
                            curexc_type
    accumulation_tree/accumulation_tree.c:10199:25: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tmp_value = tstate->exc_value;
                             ^~~~~~~~~
                             curexc_value
    accumulation_tree/accumulation_tree.c:10200:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tmp_tb = tstate->exc_traceback;
                          ^~~~~~~~~~~~~
                          curexc_traceback
    accumulation_tree/accumulation_tree.c:10201:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’; did you mean ‘curexc_type’?
         tstate->exc_type = type;
                 ^~~~~~~~
                 curexc_type
    accumulation_tree/accumulation_tree.c:10202:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’; did you mean ‘curexc_value’?
         tstate->exc_value = value;
                 ^~~~~~~~~
                 curexc_value
    accumulation_tree/accumulation_tree.c:10203:13: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
         tstate->exc_traceback = tb;
                 ^~~~~~~~~~~~~
                 curexc_traceback
    error: command 'ccache' failed with exit status 1```

install

reating build/temp.linux-x86_64-3.7/accumulation_tree
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/nfs/i1/c/home/peter/virtual-envs/optim/include -I/usr/include/python3.7m -c accumulation_tree/accumulation_tree.c -o build/temp.linux-x86_64-3.7/accumulation_tree/accumulation_tree.o
accumulation_tree/accumulation_tree.c:4:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ImportWarning on 3.6+

Trying to import this package on newer versions of python triggers the following warning (which can become an error):

$ python -Werror -c 'import accumulation_tree'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/stum/test36/lib/python3.6/site-packages/accumulation_tree/__init__.py", line 2, in <module>
    from .accumulation_tree import AccumulationTree
  File "accumulation_tree/accumulation_tree.pyx", line 2, in init accumulation_tree.accumulation_tree
ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__

I've replicated this behavior on 3.6.10, 3.7.6 and 3.8.2 on both mac and linux. I just installed using pip install accumulation_tree

I've found cython/cython#1720 and cython/cython#1753, which suggest that adding from __future__ import absolute_import can resolve this... The only problem is that accumulation_tree already includes that code, and yet it still triggers that warning.
The other suggestion on those issues is to cythonize the extension with language_level=3. I can confirm that adding # cython: language_level=3 to the top of accumulation_tree.pyx or changing the setup.py incantation to use cythonize(..., language_level="3") solve the problem.

I'm not totally sure what the plans for version support or use of cythonize are for this module, so I didn't just want to send an unsolicited PR. I can if you'd like, though!

The latest version doesn't work on Windows

Hello,

With Python 2.7.16 on Windows the following code

from accumulation_tree import AccumulationTree
t = AccumulationTree(lambda x: x)
t.insert(1, 1)

fails with this error:

Traceback (most recent call last):
  File "D:\app\scripts\--TMP--\test.py", line 3, in <module>
    t.insert(1, 1)
  File "accumulation_tree\\accumulation_tree.pyx", line 233, in accumulation_tree.accumulation_tree._AccumulationTree.insert
TypeError: unbound method cython_function_or_method object must be called with RBTree instance as first argument (got AccumulationTree instance instead)

On macOS, it works fine with the same Python version.

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.