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

Does not handle conda environments on windows #46

Closed
paddyhoran opened this issue Dec 11, 2018 · 4 comments
Closed

Does not handle conda environments on windows #46

paddyhoran opened this issue Dec 11, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@paddyhoran
Copy link
Contributor

Many windows users use conda environments to manage their python versions. pyo3-pack does not seem to handle them well.

pyo3-pack develop mentions that I should be in a venv, but I am in a virtual environment. It's just that I am using conda not venv.

pyo3-pack relies on the python launcher, which is not installed with conda (there is a standalone installer but it does not seem to play nice with conda). The information regarding available interpreters can be gotten from conda info -e

@konstin
Copy link
Member

konstin commented Dec 15, 2018

While there are many scientific packages supporting both, anaconda/miniconda and pip/venv/virtualenv are two different ecosystems with different package managers, package formats and environments. You can use pip's wheel files with conda, but apparently that's more of an workaround for libraries without conda packages.

I've actually never worked with conda, so I can't help with adding conda support. I assume it's possible to build wheels and maybe also install them in conda environment, but real develop support like for virtualenvs will difficult. Anyway, I'm happy to take patches that make some features available on conda or at least show propers error messages about conda not being supported.

@paddyhoran
Copy link
Contributor Author

You can use pip's wheel files with conda, but apparently that's more of an workaround for libraries without conda packages.

Using pip wheels in a conda environment has worked flawlessly for me. I just want to be able to build a wheel using my conda environment.

I'm taking a look and trying to find a way to make it work, I may ask a few questions as I work toward a PR, hope that's ok...

One fundamental question I have is why can't we just use the python found on the PATH? This way I could just make sure I activate my development environment and build the wheel.

I see from the code that you search for all the installed interpreters, why do we need to do this? Obviously, I'm missing something fundamental? (The only reason I can think of is that you somehow make the resulting wheel compatible with all interpreters, although this seems wrong).

Thanks for this great package!

@konstin
Copy link
Member

konstin commented Dec 15, 2018

One fundamental question I have is why can't we just use the python found on the PATH? This way I could just make sure I activate my development environment and build the wheel.

pyo3 and rust-cpython are using parts of the unstable python c abi, which is different for each python release and for different abiflags (which in practice only differ for debug builds for python 3). This means for those bindings we must build a package for each abi, which I try doing by just using all findable python versions. I've written a blog post which goes into greater detail.

I'm taking a look and trying to find a way to make it work, I may ask a few questions as I work toward a PR, hope that's ok...

Sure, feel free to ask!

@konstin konstin added the enhancement New feature or request label Dec 15, 2018
@konstin
Copy link
Member

konstin commented Jan 22, 2019

Fixed by #52

@konstin konstin closed this as completed Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants