Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

[QST]Can not install cuCIM through conda #441

Closed
nicolexi opened this issue Nov 16, 2022 · 5 comments
Closed

[QST]Can not install cuCIM through conda #441

nicolexi opened this issue Nov 16, 2022 · 5 comments
Labels
question Further information is requested

Comments

@nicolexi
Copy link

nicolexi commented Nov 16, 2022

Hi I can not install cuCIM through conda
it will reports:
image

Also, I checked the channel for the cuCIM and the link is "https://anaconda.org/rapidsai/repo" rather than "https://anaconda.org/rapidsai/"

I tried the pip also and it showed that
image

Could you help me with that?

#441 (comment)

@nicolexi nicolexi added the question Further information is requested label Nov 16, 2022
@jakirkham
Copy link
Member

Windows is currently unsupported. That said, WSL may work

@monzelr
Copy link
Contributor

monzelr commented Nov 17, 2022

Hi @nicolexi,

I did install cucim on my windows machine, but I am not using conda. What you can try is the following:

  • download and install git
  • open the conda command prompt,
  • activate your conda environment and type in the following:
cd %userprofile%
git clone https://github.com/rapidsai/cucim.git
cd cucim
git checkout v22.10.00
cd %userprofile%\cucim\python\cucim
python setup.py install




Python venv approach (working for me)
I installed cucim on my windows machine with python/pip/git and this is working so far.
What you need is git and an installed Cuda Toolkit (e. g. cuda 11.0) which has to match to the cupy cuda version!

Copy the following code in an empty *.bat file and call this bat file in your window's CMD:

@echo off

REM starting the script with clearing the screen
cls

REM Python environment name
set environment_name=cucim
REM set python version -- if you change this, please change also the python download path
set python_ver=38
REM python path
set python_path=%userprofile%\python%python_ver%
REM python environments path
set envs_path=%userprofile%\python%python_ver%_envs
REM the new python environment path
set environment_path=%envs_path%\%environment_name%

set python=%userprofile%\python%python_ver%_envs\%environment_name%\Scripts\python.exe
set pip=%userprofile%\python%python_ver%_envs\%environment_name%\Scripts\pip.exe

REM install python if not done yet -- GET THE CORRECT DOWNLOAD PATH FOR THE PYHTON VERSION!
if not exist %python_path%\ (
ECHO Python will be installed in...
ECHO %python_path%
ECHO Download Python...
curl --get --output %userprofile%\Downloads\python%python_ver%_installer.exe https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe
ECHO Install Python...
mkdir %python_path%
%userprofile%\Downloads\python%python_ver%_installer.exe /passive TargetDir="%python_path%"
echo ... done!
) else (
ECHO Python%python_ver% is already installed.
)

REM Set main pip and python - never install in your main python, use the environment instead
set main_python=%userprofile%\python%python_ver%\python.exe
set main_pip=%userprofile%\python%python_ver%\Scripts\pip.exe

REM Upgrade pip
%main_python% -m pip install --upgrade pip

if not exist %envs_path%\ (
mkdir "%envs_path%"
)

if not exist %environment_path%\ (
%main_python% -m venv %environment_path%
)

REM echo installing python modules via pip...
%python% -m pip install --upgrade pip
%pip% install -U setuptools
%pip% install numpy==1.20.3
%pip% install scipy==1.6.3
%pip% install cupy-cuda110==11.3.0
%pip% install scikit-image

cd %userprofile%
git clone https://github.com/rapidsai/cucim.git
cd cucim
git checkout v22.10.00
cd %userprofile%\cucim\python\cucim
%python% setup.py install

The last line of window's CMD should be look like this:

Package      Version
------------ ----------
click        8.1.3
colorama     0.4.6
cucim        22.10.0
cupy-cuda110 11.3.0
fastrlock    0.8.1
imageio      2.22.4
networkx     2.8.8
numpy        1.20.3
packaging    21.3
Pillow       9.3.0
pip          22.3.1
pyparsing    3.0.9
PyWavelets   1.4.1
scikit-image 0.19.3
scipy        1.6.3
setuptools   65.5.1
tifffile     2022.10.10
done with pip

What the script basically did is to install python 3.8 in your %userprofile% path (for me, this path is C:\Users\RuneMonzel). Also, it creates an environment in %userprofile%\python38_envs\cucim, so you need to call the %userprofile%\python38_envs\cucim\Scripts\python.exe to use the python environment.
If you need to reinstall the python environment, just delete the folder cucim.


Be aware that cucim is not supported on windows - so maybe some things will break. For me is everything working so far. ;-)

@nicolexi
Copy link
Author

Thanks! I succeed in the ubuntu

@grlee77
Copy link
Contributor

grlee77 commented Nov 22, 2022

The method @monzelr mentions above of installing the Python library without first building the C++ one should work for cucim.skimage and cucim.core, but cucim.clara will not be available. That is because the skimage and core modules rely only on CuPy, which has Windows support.

@gigony
Copy link
Contributor

gigony commented Nov 28, 2023

Closing this. Windows support-relased questions are discussed in #454 (comment)

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

No branches or pull requests

5 participants