How can I install with --no-cython-compile?

961 views
Skip to first unread message

Himanshu Mishra

unread,
Jul 16, 2015, 4:29:24 AM7/16/15
to cython...@googlegroups.com
On my CI environment, I install Cython using `pip install Cython` but I have seen that using --no-cython-compile is recommended by Stefan. But I'm confused how can I do that?

I don't think he means
$ pip install Cython --no-cython-compile

because it can't work

Marcel Martin

unread,
Jul 16, 2015, 5:36:30 AM7/16/15
to cython...@googlegroups.com
I use

pip install --install-option="--no-cython-compile" Cython

However, pip 7.0.0 and later cache installed packages automatically in
the form of wheels. Subsequent installs are therefore much faster, even
faster than the above command (one second or so). If you can convince
your CI to use that, that would be the way to go since it applies to all
packages and there is no need to special-case Cython anymore.

Regards,
Marcel

Himanshu Mishra

unread,
Jul 17, 2015, 6:55:33 AM7/17/15
to cython...@googlegroups.com

I use

pip install --install-option="--no-cython-compile" Cython

Thank you Marcel, that worked.
 
However, pip 7.0.0 and later cache installed packages automatically in
the form of wheels. Subsequent installs are therefore much faster, even
faster than the above command (one second or so). If you can convince
your CI to use that, that would be the way to go since it applies to all
packages and there is no need to special-case Cython anymore. 

Regarding this, I have a doubt. Well, CI environments have Virtual Machines(VMs) for different virtual envs. I don't really understand how caching a wheel on one VM can be reused on the other. 

Marcel Martin

unread,
Jul 17, 2015, 7:34:05 AM7/17/15
to cython...@googlegroups.com
On 2015-07-17 11:40, Himanshu Mishra wrote:
> I use
>
> pip install --install-option="--no-cython-compile" Cython
>
>
> Thank you Marcel, that worked.

Great, glad I could help.

> However, pip 7.0.0 and later cache installed packages automatically in
> the form of wheels. Subsequent installs are therefore much faster, even
> faster than the above command (one second or so). If you can convince
> your CI to use that, that would be the way to go since it applies to
> all
> packages and there is no need to special-case Cython anymore.
>
>
> Regarding this, I have a doubt. Well, CI environments have Virtual
> Machines(VMs) for different virtual envs. I don't really understand how
> caching a wheel on one VM can be reused on the other.

It surely depends on which CI you use, but Travis supports it. See
https://github.com/nickstenning/travis-pip-cache for an example.

Marcel

Himanshu Mishra

unread,
Jul 18, 2015, 5:42:17 AM7/18/15
to cython...@googlegroups.com
That's very much helpful and incredible. Thanks!
Reply all
Reply to author
Forward
0 new messages