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

Added windows compilation (see issue #5, credit: mohammadkamalzare) #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jotaf98
Copy link

@jotaf98 jotaf98 commented Aug 17, 2018

The compilation script (compilewindows.bat) could be improved (i.e. run the dev console automatically), but it has enough instructions to run as-is.

@jotaf98 jotaf98 mentioned this pull request Aug 17, 2018
@Borda
Copy link
Contributor

Borda commented Aug 17, 2018

Hi, I have tried you commit, but did not help - https://ci.appveyor.com/project/Borda/pygco/build/job/cfyrtu6pen7mvfsl

@jotaf98
Copy link
Author

jotaf98 commented Aug 17, 2018

There's 2 things:

  1. I tested with Python 3 / 64-bits (default for Windows), not 2.7
  2. You need to compile with compilewindows.bat using the right console (follow the instructions given by the script)

@CaiWZ
Copy link

CaiWZ commented Mar 28, 2020

Traceback (most recent call last):
File "E:\PythonProjects\SnowflakeRemoval\pyGCO-buil-win\gco_init_.py", line 8, in
from pygco import *
ModuleNotFoundError: No module named 'pygco'

During`` handling of the above exception, another exception occurred:

Traceback` (most recent call last):

File "E:\PythonProjects\SnowflakeRemoval\pyGCO-buil-win\gco\pygco.py", line 4, in

from cgco import _cgco, _SMOOTH_COST_FN

ModuleNotFoundError: No module named 'cgco'

During`` handling of the above exception, another exception occurred:

Traceback`` (most recent call last):

File "test_examples.py", line 9, in
import gco
File "E:\PythonProjects\SnowflakeRemoval\pyGCO-buil-win\gco_init_.py", line 10, in
from gco.pygco import *
File "E:\PythonProjects\SnowflakeRemoval\pyGCO-buil-win\gco\pygco.py", line 6, in
from .cgco import _cgco, _SMOOTH_COST_FN
File "E:\PythonProjects\SnowflakeRemoval\pyGCO-buil-win\gco\cgco.py", line 47, in
_cgco = np.ctypeslib.load_library(CGCO_LIB_NAME, CGCO_LIB_PATH)
File "D:\Program\Anaconda3\lib\site-packages\numpy\ctypeslib.py", line 152, in load_library
return ctypes.cdll[libpath]
File "D:\Program\Anaconda3\lib\ctypes_init
.py", line 439, in getitem
return getattr(self, name)
File "D:\Program\Anaconda3\lib\ctypes_init
.py", line 434, in getattr
dll = self.dlltype(name)
File "D:\Program\Anaconda3\lib\ctypes_init
.py", line 364, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

  • when i test python test.py ,there are some bugs .so what can i do? thx

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 this pull request may close these issues.

3 participants