Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[I2K workshop] Installation errors for DaCapo on Windows 10, saying Microsoft Visual C++ is required #313

Open
AJFSalomon opened this issue Oct 25, 2024 · 2 comments

Comments

@AJFSalomon
Copy link

Hello! As promised during your workshop at I2K2024, here's the problem I had trying to install DaCapo on my machine. I couldn't replicate the exact process I went through the first time, somehow some problems disappeared and I'm not sure why, so here's the last situation I was in before I gave up:

Desktop:

  • OS: Windows 10

Bug description
I tried to install DaCapo in a Conda environment and got several installation errors. I managed to fix some of them, but in the end it failed to build installable wheels for lsds and upath. Microsoft Visual C++ 14.0 or greater is apparently required, but I was reluctant to install it since I wanted to do everything in a disposable conda environment.

Here the error log I got after running pip install -e .:

Building wheel for lsds (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for lsds (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
  	C:\Users\[ME]\AppData\Local\Temp\pip-build-env-e3r3vrz4\overlay\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\[ME]\AppData\Local\Temp\pip-install-z2dpt_x1\lsds_76567fdd9c9c4a3ba976f7538fe15442\lsd\post\merge_tree.pyx
    	tree = Parsing.p_module(s, pxd, full_module_name)
  	Compiling lsd/post/merge_tree.pyx because it changed.
  	[1/1] Cythonizing lsd/post/merge_tree.pyx
  	error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  	[end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lsds
  Building wheel for upath (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
  	C:\Users\[ME]\miniconda3\envs\dacapo-workshop\Lib\site-packages\setuptools\_distutils\dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
    	warnings.warn(msg)
  	running bdist_wheel
  	running build
  	running build_ext
  	building 'upath' extension
  	error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  	[end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for upath
  Running setup.py clean for upath
Successfully built dacapo-ml
Failed to build lsds upath
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (lsds, upath)

To Reproduce

conda create -n dacapo-workshop python pip pytorch
conda activate dacapo-workshop
pip install scikit-image[data]
pip install matplotlib
git clone https://github.com/janelia-cellmap/dacapo.git
cd dacapo
pip install -e .

I also tried to install every package via conda as follows:

conda create -n dacapo-workshop python pip pytorch scikit-image[data] matplotlib
conda activate dacapo-workshop
git clone https://github.com/janelia-cellmap/dacapo.git
cd dacapo
pip install -e .

But I got a similar output.

Expected behavior
A completed installation that does not require the additional installation of a Windows IDE ?

@mzouink
Copy link
Member

mzouink commented Nov 11, 2024

can you please try the steps recommended here : https://stackoverflow.com/a/64262038

(None here have a windows machine :') )

@pattonw
Copy link
Contributor

pattonw commented Nov 12, 2024

This looks like its caused by our dependency on the lsds package which is trying to build from source code. Its also trying to build the postprocessing code (this includes some cython functions we don't need) so we should probably just work with Arlo to see if we can simplify our dependencies.
We should also add Windows and MacOS to the github action test workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants