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

LNK error installing tables and scikit-learn dependencies with Windows #410

Closed
Jonothon opened this issue Apr 3, 2022 · 4 comments
Closed

Comments

@Jonothon
Copy link

Jonothon commented Apr 3, 2022

When executing pip install flexmeasures on a windows machine . I receive an error when installing the tables and scikit-learn libraries (see attachment for errors.)
pip_flexmeasures_erros.txt

Both packages only result in an error when installing these specific versions. (tables-3.6.1 and scikit-learn-1.0.1). When installing the latest versions (pip install tables/scikit-learn), no errors arise.

@nhoening
Copy link
Contributor

nhoening commented Apr 3, 2022

Thanks, interesting to see somebody install FlexMeasures on Windows, as we don't use Windows machines internally right now.

After you installed latest versions by hand, is FlexMeasures starting up okay? (e.g. run flexmeasures --help or flexmeasures run)

Digging a bit deeper, I'm running into confusing outcomes:

  • The tables library isn't a FlexMeasures dependency. It is not in the tree of dependencies generated in requirements/app.txt. So I'm not sure why pip install flexmeasures on Windows installs it in the first place. Maybe there is some information in the logs of yours. It would be good to see what the output is right before "Collecting tables==3.6.1".
  • Also, scikit-learn should be the latest version. We require 1.0.2, which is the latest version. Not sure why 1.0.1 is being installed here ...

So first, it would be very helpful to see which version of FlexMeasures this is about - which version is your computer trying to install? It should be v0.9.0 or higher, as since then, our requirements changed. Actually in this last link I see that tables used to be part of our requirements tree.

Please try pip install --upgrade flexmeasures to make sure you fetch the latest version! Curious to hear if that will help.

Finally, two tips for people who have these troubles (from my armchair as we do no currently have a windows computer to test this on):

  • Use Anaconda for your data science - backed dependencies, as advised for instance here.
  • Try Python 3.9. That is the version we know works for us. We will add testing installing on Python 3.10 soon.

@nhoening
Copy link
Contributor

@Jonothon can you tell me which Python version you are using? (python --version) That might be an explanation, because pip will only install versions of libraries which still support the given Python version. I've seen this leading to similar problems.

Also, if you are a bit familiar with Docker - we now have a Docker image for FlexMeasures. See also #416. This means once Docker works on your machine, FlexMeasures will run in the Docker container which has pre-installed everything.

@Jonothon
Copy link
Author

Sorry for the late reaction. I tried multiple things, but it is now working in my Windows environment!

I indeed had to change the python version from 3.10.x to 3.9 to fix the issue for the tables package.
The other issues was fixed by using this SO post. Something to do with correctly linking a c++ distribution. The solution of manually copying files to another folder is a bit ugly, but it solved the problem.

Good to hear that a Docker image is added. That would have my preference, so I will also start testing that option in the future!

@nhoening
Copy link
Contributor

Great to hear that it works in principle! The new Docker image is here. Let us know if there are other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants