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

Problem when using the code in win10 #7

Open
XuhuiZhou opened this issue Nov 9, 2017 · 3 comments
Open

Problem when using the code in win10 #7

XuhuiZhou opened this issue Nov 9, 2017 · 3 comments

Comments

@XuhuiZhou
Copy link

XuhuiZhou commented Nov 9, 2017

Hi, I am really excited about your work. I am currently doing my own research. However, I am facing a problem now, when I run it on my windows10 device it show something like below
s
It seems to me that is not the problem of the system but the problem of the code itself.
Hope you can give me a way to fix this and I will be really appreciated.

@tbraga14
Copy link

Hi Edaward, are you still having issues with setup.py? I tested on Windows 7/10 and got it to work. The reasons you can't install might be:

  • It looks like you have broken gcc/g++ headers or link libraries.

Remove previous migw in your virtual environment with conda remove mingw. Try running conda install mingw libpython. You must have a working gcc/g++ dist in your PATH, like TDM-GCC (worked for me). Watch out to not mix gcc's in PATH.

  • You can also have wrong package versions.

Having different versions than specified in requirements.txt can throw any sorts of unrelated errors. Uninstall previously installed pkgs with e.g. conda remove decorator, then install only the exactly same versions from requirements.txt using e.g. conda install networkx==1.11 (one by one), except for rcn-ref==1.0.0 that is build as the setup progresses.

  • Notes

Use python setup.py install (don't bother with that bash Makefile in Windows or other ways of installing). This script was meant to work on the fly.

I installed in the default enviroment instead of virtualenv while it might work too.

If this is still not working and you really want this code to work, uninstall everything (MingW, Cygwin, Python2.7, Anaconda, also cleaning your system PATH from Cygwin and gcc stuff: believe me, it can be a real mess) and then start a clean install of Miniconda Python 2.7 following Daniel Renshaw's answer steps 1-5. Anaconda is bloated with packages you don't really need so install Miniconda instead.

To run python run.py, you must have data folder (with MNIST folder inside) in the same directory as run.py.

@robertson-so
Copy link

Like @tbraga14 said, it's only possible to compile dilation.cc on Windows if you use MinGW, using gcc/g++.

Technically speaking:
The problem occurring here is the use of variable length arrays.
While the dilation code is valid in C99 standard, Visual C++ for Python supports only C89 and won't accept this type of array declaration, leaving gcc/g++ as the only compiler option to use here.

More technical info: 6.19 Arrays of Variable Length

@davidleon
Copy link

take a look at https://www.github.com/davidleon/science_rcn it's windows visual c compatible. It runs on windows 10.

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

4 participants