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

Support on using in Windows? #9

Closed
realzehuali opened this issue Mar 30, 2023 · 3 comments
Closed

Support on using in Windows? #9

realzehuali opened this issue Mar 30, 2023 · 3 comments

Comments

@realzehuali
Copy link

Seurat V5 is coming, but my installation of BPCells in Windows never suceeded. Do you have any plan for support using BPCells in Windows?

@bnprks
Copy link
Owner

bnprks commented Mar 30, 2023

Thanks for your interest in BPCells! I have good news which is that we fully support Windows. It can be a bit tricky to set up the first time since BPCells is not yet on CRAN, but I'll share my memory what I did when first setting up. Hopefully it will also work for you and if not please reply and I can try to improve my instructions :)

The basic ingredients you need to install BPCells on any system (Windows or otherwise) are a C++ compiler, and the hdf5 libraries. On my windows machine, I have BPCells installed both in Windows itself, and in WSL (Ubuntu running within Windows).

If you use want to install on Windows (most likely):

  1. Download and install the appropriate version of R tools for windows: https://cran.r-project.org/bin/windows/Rtools/. This includes both a C++ compiler and hdf5 libraries, and is a truly excellent tool provided by the R core team.
  2. Running installation from R or Rstudio should just work after that.

If you want to install in WSL:

  1. Install WSL if you haven't already
  2. I recommend also installing Windows Terminal as well for convenience
  3. Run a WSL terminal, then from within linux, install R, install hdf5 with sudo apt-get install libhdf5-dev
  4. From there, BPCells should install fine.
  5. I would also recommend installing RStudio server, which you can start from WSL using sudo rstudio-server start, then load http://localhost:8787 in your Windows web browser and log in as your user. This will connect you to an R session running in linux

@bnprks bnprks closed this as completed Mar 30, 2023
@realzehuali
Copy link
Author

Thank you for the quick response. Here is my bug information:

remotes::install_github("bnprks/BPCells")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo bnprks/BPCells@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file 'C:\Users\MSI\AppData\Local\Temp\Rtmpy8DLCj\remotes124c22144b\bnprks-BPCells-62c5726/DESCRIPTION' ...
─ preparing 'BPCells': (420ms)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'BPCells_0.1.0.tar.gz'
Warning: file 'BPCells/cleanup' did not have execute permissions: corrected
Warning: file 'BPCells/configure' did not have execute permissions: corrected

Installing package into ‘D:/4.0’
(as ‘lib’ is unspecified)

  • installing source package 'BPCells' ...
    ** using staged installation
    Testing hdf5 by compiling example program...
    C:\rtools42/x86_64-w64-mingw32.static.posix/bin/ld.exe: cannot find -lsz
    collect2.exe: error: ld returned 1 exit status

Unable to locate libhdf5. Please install manually or edit compiler flags.
ERROR: configuration failed for package 'BPCells'

  • removing 'D:/4.0/BPCells'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/MSI/AppData/Local/Temp/Rtmpy8DLCj/file124c3e1c14d5/BPCells_0.1.0.tar.gz’ had non-zero exit status

I was using R 4.2.3 and Rtools42. I can find Hdf5 in my Rtools42 folder. But there is still this bug.

@realzehuali
Copy link
Author

I upgraded my R to devel version and Rtools42 to Rtools43, it works. Thank you very much!

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

2 participants