open2c / cooler

A cool place to store your Hi-C
https://open2c.github.io/cooler
BSD 3-Clause "New" or "Revised" License
207 stars 50 forks source link

Installation on Windows 10 #224

Closed ysora closed 9 months ago

ysora commented 4 years ago

Hi, I am using Windows 10 and trying to install cooler package. When I try pip install cooler there seems a problem in installing 'pypairix' package and it is because of the 'unistd.h' file which does not exist in Windows.

`Building wheels for collected packages: pypairix Building wheel for pypairix (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\ysora\AppData\Local\Temp\pip-install-fpge_cwt\pypairix\setup.py'"'"'; file='"'"'C:\Users\ysora\AppData\Local\Temp\pip-install-fpge_cwt\pypairix\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\ysora\AppData\Local\Temp\pip-wheel-rllw7k70' cwd: C:\Users\ysora\AppData\Local\Temp\pip-install-fpge_cwt\pypairix\ Complete output (12 lines): running bdist_wheel running build running build_ext building 'pypairix' extension creating build creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\Release creating build\temp.win-amd64-3.8\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE=1 -Isrc -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/bgzf.c /Fobuild\temp.win-amd64-3.8\Release\src/bgzf.obj bgzf.c src/bgzf.c(28): fatal error C1083: ?? ??? ? ? ????. 'unistd.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe' failed with exit status 2

ERROR: Failed building wheel for pypairix Running setup.py clean for pypairix`

python -m pip install cooler also gives same error.

Next, I tried it with conda install -c conda-forge -c bioconda cooler . However, it showed an error like below:

**`(base) C:\Users\ysora>conda install -c conda-forge -c bioconda cooler Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: \ Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions`**

Is there any solution for this issue? Thanks.

nvictus commented 4 years ago

Yeah, pairix is likely not supported on Windows. However, you don't need it to use cooler (unless you are loading pairix-indexed pairs).

Can you make sure the remaining dependencies are installed and try pip install --no-deps cooler?

In general, on windows, I'd recommend using the Windows Subsystem for Linux so you have access to a full unix environment. However, we should perhaps make pypairix a soft dependency to support native windows...

ysora commented 4 years ago

Thanks. After typing pip install --no-deps cooler, I also had to install simplejson and multiprocess packages. After that, cooler was imported normally.

Ignite616 commented 2 years ago

I installed cooler using pip install --no-deps cooler on win10, but installing simplejson fails

thomas-reimonn commented 9 months ago

Issue fixed by: #383