cyac icon indicating copy to clipboard operation
cyac copied to clipboard

error when installing from pip

Open cici08 opened this issue 3 years ago • 7 comments

I'm getting the following error when trying to install cyac

% pip --version pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)

Don't even know if it's cyacs fault, but maybe you can help me?

% pip install cyac Collecting cyac Using cached cyac-1.9.tar.gz (47 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: cython>=0.29.0 in /usr/local/lib/python3.9/site-packages (from cyac) (3.0.2) Building wheels for collected packages: cyac Building wheel for cyac (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for cyac (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [107 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.macosx-11-x86_64-cpython-39 creating build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/version.py -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/init.py -> build/lib.macosx-11-x86_64-cpython-39/cyac running egg_info writing cyac.egg-info/PKG-INFO writing dependency_links to cyac.egg-info/dependency_links.txt writing requirements to cyac.egg-info/requires.txt writing top-level names to cyac.egg-info/top_level.txt reading manifest file 'cyac.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching 'pycache' found anywhere in distribution adding license file 'LICENSE' writing manifest file 'cyac.egg-info/SOURCES.txt' copying lib/cyac/ac.pxd -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/ac.pyx -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/trie.pxd -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/trie.pyx -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/unicode_portability.c -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/utf8.pxd -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/utf8.pyx -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/util.c -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/util.pxd -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/util.pyx -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/xstring.pxd -> build/lib.macosx-11-x86_64-cpython-39/cyac copying lib/cyac/xstring.pyx -> build/lib.macosx-11-x86_64-cpython-39/cyac running build_ext building 'cyac.util' extension creating build/temp.macosx-11-x86_64-cpython-39 creating build/temp.macosx-11-x86_64-cpython-39/lib creating build/temp.macosx-11-x86_64-cpython-39/lib/cyac clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c lib/cyac/util.c -o build/temp.macosx-11-x86_64-cpython-39/lib/cyac/util.o Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 434, in build_wheel return self._build_with_temp_dir( File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir self.run_setup() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in run_setup exec(code, locals()) File "", line 21, in File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/init.py", line 103, in setup return distutils.core.setup(**attrs) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands self.run_command(cmd) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run self.run_command("build") File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run self.run_command(cmd_name) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command self.distribution.run_command(command) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command super().run_command(command) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 88, in run _build_ext.run(self) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 249, in build_extension _build_ext.build_extension(self, ext) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/Cython/Distutils/build_ext.py", line 127, in build_extension super(build_ext, self).build_extension(ext) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/private/var/folders/wk/xjxk9mdj7lz95cjvqc_nqxl80000gn/T/pip-build-env-tcws4eg3/overlay/lib/python3.9/site-packages/setuptools/_distutils/spawn.py", line 57, in spawn proc = subprocess.Popen(cmd, env=env) File "/usr/local/Cellar/[email protected]/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/Cellar/[email protected]/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1739, in _execute_child env_list.append(k + b'=' + os.fsencode(v)) File "/usr/local/Cellar/[email protected]/3.9.1_3/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py", line 810, in fsencode filename = fspath(filename) # Does type-checking of filename. TypeError: expected str, bytes or os.PathLike object, not int [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for cyac Failed to build cyac ERROR: Could not build wheels for cyac, which is required to install pyproject.toml-based projects

cici08 avatar Oct 03 '23 10:10 cici08

have you installed clang ?

chenkovsky avatar Oct 04 '23 08:10 chenkovsky

No, only cython (I didn’t mean to close the issue..)

cici08 avatar Oct 04 '23 18:10 cici08

I think it might have something todo with MacOS

I created a completely new virtualenv and only installed wheel, cython and cyac and still got the error

cici08 avatar Oct 07 '23 13:10 cici08

@cici08 can you install clang first?

chenkovsky avatar Oct 08 '23 02:10 chenkovsky

clang was already installed, so I tried the version which is avalaible via brew, didn't work. I am still getting the same error.

cici08 avatar Oct 10 '23 14:10 cici08

I created a new python env.

conda create -n "p39" python=3.9

then run

pip install cyac

but cannot reproduce your problem.

Please clone this repo, and run

python3 setup.py install

chenkovsky avatar Oct 11 '23 02:10 chenkovsky

“The definition of insanity is doing the same thing over and over again and expecting different results.” - Albert Einstein

Well, I tried again and now it worked. I have no explanation, maybe I am insane. Thanks for your help though!

cici08 avatar Oct 14 '23 09:10 cici08