Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Improve setup.py to work on a machine without numpy or cython #327

Merged
merged 7 commits into from
Jul 7, 2017

Conversation

yuyu2172
Copy link
Member

@yuyu2172 yuyu2172 commented Jul 7, 2017

Related #325

The following commands will successfully install ChainerCV.

docker pull ubuntu
docker run -it ubuntu /bin/bash
# in docker session
apt-get update
apt-get install git
apt-get install python-pip
pip install -U pip
pip install pillow
pip install Cython
git clone -b setup-without-numpy https://github.com/yuyu2172/chainercv 
cd chainercv
python setup.py install

@yuyu2172 yuyu2172 changed the title Improve setup.py to work on a machine without numpy [WIP] Improve setup.py to work on a machine without numpy Jul 7, 2017
@yuyu2172 yuyu2172 changed the title [WIP] Improve setup.py to work on a machine without numpy Improve setup.py to work on a machine without numpy or cython Jul 7, 2017
@yuyu2172
Copy link
Member Author

yuyu2172 commented Jul 7, 2017

I updated the code to work on a machine without Cython if .c is in the directory.
This is the case when pip is used.
I tested in an environment where I copied .c file to the repository from Github, and run the previously posted installation commands without Cython installed.

docker pull ubuntu
docker run -it ubuntu /bin/bash
# in docker session
apt-get update
apt-get install git
apt-get install python-pip
pip install -U pip
pip install pillow
# pip install Cython
git clone -b setup-without-numpy https://github.com/yuyu2172/chainercv 

### get .c
apt-get install wget
wget https://pypi.python.org/packages/d9/5b/0dc17559a11b49a93868714ef7228b67b98f800e9faec940857c759d27bb/chainercv-0.5.1.tar.gz#md5=23d188d95854fb781a01698a6f11f447
tar xvzf chainercv-0.5.1.tar.gz
cp chainercv-0.5.1/chainercv/utils/bbox/_nms_gpu_post.c chainercv/chainercv/utils/bbox/

cd chainercv
python setup.py install

@Hakuyume
Copy link
Member

Hakuyume commented Jul 7, 2017

@yuyu2172 Could you remove the following lines from the document?

# If Cython has not been installed yet, install it by a command like
# pip install Cython

https://github.com/chainer/chainercv/blob/master/docs/source/index.rst#pip

@@ -3,7 +3,6 @@ channels:
- !!python/unicode
'defaults'
dependencies:
- Cython
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot remove this line because this repository does not contain *.c files. Without this line, Travis CI fails.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Copy link
Member

@Hakuyume Hakuyume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Hakuyume Hakuyume merged commit 8293ac2 into chainer:master Jul 7, 2017
@yuyu2172 yuyu2172 added this to the v0.6 milestone Jul 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants