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

Can't install Cellcano in M1 Mac #6

Closed
nleroy917 opened this issue Jun 19, 2023 · 2 comments · May be fixed by #7
Closed

Can't install Cellcano in M1 Mac #6

nleroy917 opened this issue Jun 19, 2023 · 2 comments · May be fixed by #7

Comments

@nleroy917
Copy link

Hi! Thanks for providing this package. I really appreciate the clear documentation.

I had an issue installing Cellcano:
I can't seem to install Cellcano in a fresh virtual environment with python on my M1 MacBook. I first tried to install using the instructions in the documentation:

pip install Cellcano

This gives a really long, and odd stack trace:

pip install Cellcano
Collecting Cellcano
  Using cached Cellcano-1.0.4.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of cellcano to determine which version is compatible with other requirements. This could take a while.
  Using cached Cellcano-1.0.3.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached Cellcano-1.0.2.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached Cellcano-1.0.1.tar.gz (15 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
  Using cached Cellcano-1.0.0.tar.gz (15 kB)
  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
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "/Users/nathanleroy/sandbox/cellcano-test/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/nathanleroy/sandbox/cellcano-test/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/nathanleroy/sandbox/cellcano-test/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/_w/yrr0qqbd52gc6jj0fnqyk8640000gn/T/pip-build-env-fhqejdy_/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/_w/yrr0qqbd52gc6jj0fnqyk8640000gn/T/pip-build-env-fhqejdy_/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/_w/yrr0qqbd52gc6jj0fnqyk8640000gn/T/pip-build-env-fhqejdy_/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/private/var/folders/_w/yrr0qqbd52gc6jj0fnqyk8640000gn/T/pip-build-env-fhqejdy_/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 4, in <module>
      FileNotFoundError: [Errno 2] No such file or directory: 'DESCRIPTION'
      [end of output]

It seemed to be getting stuck looking through PyPi versions... so I then cloned the repository and tried to install from source:

git clone https://github.com/marvinquiet/Cellcano.git
cd Cellcano
pip install .

This got me further but gave me a weird FileNotFoundError for the rpy2 dependency:

FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/_w/yrr0qqbd52gc6jj0fnqyk8640000gn/T/pip-install-5_qkniwu/rpy2_6697f4de8fe84bab886138ed845b2719/requirements.txt'

Finally, I just manually removed all pinned dependencies from setup.py and specified the tensorflow-macos requirement instead of tensorflow, and then everything was installed nicely. I haven't tested it fully, but I thought I'd open the issue to let you know there might be install issues on an M1.

@marvinquiet
Copy link
Owner

Hi Nathan @nleroy917,

I feel really grateful that you have helped me test this on M1. I will update the documentation about this. Please let me know if you encounter any other problems. I do not have an M1 but I will try my best to help.

Sincerely,
Wenjing

@nleroy917
Copy link
Author

Thanks! Everything worked great once I messed with the dependencies a bit. It was super easy using the reference data you provided - pipelines like this are very much needed!!!

For reference, these are the reqs I went with:

 install_requires=[
        'tensorflow',
        'six',
        'anndata',
        'scanpy',
        'numpy',
        'h5py',
        'keras',
        'rpy2'
]

I just removed any pinned dependencies.

@lujiaying lujiaying linked a pull request Jun 28, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants