TractSeg
TractSeg copied to clipboard
Failed to install tractseg when using pip
Hi developers: I'm trying to install TractSeg on Centos7. But the pip install TractSeg returns some errors. Could you please help me how to fix this problem?
Collecting TractSeg
Using cached TractSeg-2.4.tar.gz (4.3 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
Traceback (most recent call last):
File "/home/opt/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/home/opt/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/opt/miniconda3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 23, in <module>
ext_modules=cythonize(ext_modules),
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 970, in cythonize
module_list, module_metadata = create_extension_list(
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 816, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "/tmp/pip-build-env-l00rk9ye/overlay/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 114, in nonempty
raise ValueError(error_msg)
ValueError: 'tractseg/libs/tractseg_prob_tracking.pyx' doesn't match any files
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
I had the same problem on Ubuntu. I ended up installing the previous version (2.3) instead (pip install TractSeg==2.3
).
I had the same problem on Ubuntu. I ended up installing the previous version (2.3) instead (
pip install TractSeg==2.3
).
Thanks for your help ! I have solve the problem.
This was an issue with cython which I added recently. It only works on the operating system which I used for building the binaries (ubuntu). I removed cython again. So in the newest version (2.5) it should be working just fine again. If you want to use cython for more speed of the tracking then use the cython_tracking
branch.
@wasserth You may find the following project useful:
https://github.com/pypa/cibuildwheel
It allows you to build multiple Cython wheels, targeting diverse platforms, and publish them on PyPI.
Thanks for this tip. I will give it a try.
@HusBunia Could you try again to install TractSeg the following way and tell me if it works:
pip install future nibabel matplotlib sklearn scipy tqdm six psutil dipy joblib seaborn
pip install -i https://test.pypi.org/simple/ TractSeg
This should install TractSeg with compiled cython wheels for all linux and windows platforms.