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

Error about WeightedAllPairs() #6

Open
fyfef1 opened this issue Oct 13, 2019 · 4 comments
Open

Error about WeightedAllPairs() #6

fyfef1 opened this issue Oct 13, 2019 · 4 comments

Comments

@fyfef1
Copy link

fyfef1 commented Oct 13, 2019

捕获

@david-cortes
Copy link
Owner

This package unfortunately only runs under Python 3. You can check in the readme file that there's a warning about it too.

@fyfef1
Copy link
Author

fyfef1 commented Oct 14, 2019

I am very grateful for your reply, but I want to say that I have encountered problems in the installation of python3.7, I have not found the reason for the error, I would like to ask you to have the .whl format installation package? I want to try to install the installation package. :-)
image

@david-cortes
Copy link
Owner

I don’t have a .whl file and wouldn’t know how to produce one. The thing about the installation problems you get is that, after some version of this package, I explicitly added in the setup.py file that the package requires Python 3, so if you try to install it under Python 2, it will select an older version that did not have that Python 3 requirement in the setup.py file, but which still doesn’t run under 2.

And the issue with the installation is most likely about compiled C code that later versions of this package use to run faster. In order to install it, you can either:

  • Install an older version (pip install costsensitive=0.1.1), which does not have any C code, but is slower and has some bugs.
  • Setup your Python environment to use some C compiler – in Anaconda in Windows you can install MINGW (conda install libpython m2w64-toolchain - or something like that, you can google it), or you can install Visual Studio or MS Build Tools with support for msvc140 (you have to select it explicitly as it’s not a default) that Anaconda uses to build Python. In Linux you’d just need to install GCC from a package manager.

@fyfef1
Copy link
Author

fyfef1 commented Oct 14, 2019

I am very grateful for your reply. I gave up the installation step, but I solved the error by directly applying init.py. Thank you again for your help.:-D

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

2 participants