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

from collections import Counter keeps giving a TypeError #8

Closed
RodneyKoolman opened this issue Aug 10, 2023 · 16 comments
Closed

from collections import Counter keeps giving a TypeError #8

RodneyKoolman opened this issue Aug 10, 2023 · 16 comments

Comments

@RodneyKoolman
Copy link

image

I'm trying to run the model but keep running into this issue. I'm running miniconda3 for all my projects but when running the notebook it keeps returning this error. Wondering if you had any such issue?

@RodneyKoolman
Copy link
Author

RodneyKoolman commented Aug 10, 2023

Digging deeper into the lib collections it gives the warning "Import "_collections" could not be resolved". Running the Python interpreter 3.9.17 in miniconda3 like you suggested.

Don't know what I'm missing here...

@RodneyKoolman
Copy link
Author

Not running it in notebooks gets me a little further. Getting different errors. Digging even deeper, seeing that phenopy/config.py tries to access a os.path named HOME. That doesn't exist on Windows. Are you running linux?

@ldingemans
Copy link
Owner

ldingemans commented Aug 10, 2023

Not running it in notebooks gets me a little further. Getting different errors. Digging even deeper, seeing that phenopy/config.py tries to access a os.path named HOME. That doesn't exist on Windows. Are you running linux?

We have been mainly running Linux indeed, but Windows as well - but I think I know what the issue is on Windows. Could you try this fix?

GeneDx/phenopy#48

@RodneyKoolman
Copy link
Author

Thanks! That works. Onto the next error. Did you see this one before?

image

@ldingemans
Copy link
Owner

ldingemans commented Aug 10, 2023

No, Ive not encountered that before. What is your mxnet version?

(let me rerun the automated tests here on github to see if I can reproduce the issue there!)

@RodneyKoolman
Copy link
Author

image

1.2.0. No version is specified in the requirements file so i guess it's the latest.

@ldingemans
Copy link
Owner

Thats strange, its a pretty old version (although I could have specified that).

Could you try installing a newer version? 1.7.0 for instance? i.e. pip install mxnet==1.7.0.post2

If thats the issue, I will update the requirements.txt

@RodneyKoolman
Copy link
Author

RodneyKoolman commented Aug 10, 2023

I guess that's only a version for linux. Can go up to 1.2.0 but it won't let me pip install mxnet==1.7.0.post2
Still checking to see if there's another build for windows.

@ldingemans
Copy link
Owner

I've just verified on a windows machine that I can install 1.7.0, so not sure what is going wrong then?

@RodneyKoolman
Copy link
Author

RodneyKoolman commented Aug 10, 2023

Hmm that's weird. What's your numpy version there?

https://stackoverflow.com/questions/66925556/problem-installing-mxnet-using-pip-on-windows

@ldingemans
Copy link
Owner

maybe try this:

pip uninstall numpy
pip install mxnet==1.7.0.post2

pip uninstall numpy
pip install numpy==1.23.5

yes, very convoluted, I completely agree, but packages in python can be troublesome, maybe this works?

@RodneyKoolman
Copy link
Author

RodneyKoolman commented Aug 10, 2023

Tried your suggestion. This is the output from pip install mxnet==1.7.0.post2

image

@ldingemans
Copy link
Owner

related to numpy on windows maybe? here are some pointers numpy/numpy#13573?

@RodneyKoolman
Copy link
Author

RodneyKoolman commented Aug 10, 2023

Yes i got it to work! Thanks for your help. Now the above pip commands work.
The solution was hidden in the install mxnet==1.7.0.post2 error. It needed the VS C++ Build Tools installed. Did that and it worked like a charm. Looks like it's running the tutorial data now.

image

I haven't got the GPU inference to work. It gives me missing library's error but will look at that for another day. CPU inference is working. Can't get this to work in the Jupyter notebooks, just made a py script for now.

Thanks for your support and work!

@RodneyKoolman
Copy link
Author

FYI got the CUDA part working.
After doing "conda install cudnn" you need to download zlibwapi.dll and add it to the system PATH env variable. Now GPU inference is working.

@ldingemans
Copy link
Owner

great to hear you've solved it! Thanks for opening the issue - and closing it now that it is clear. I will look into CI for Windows a bit more if there are more users that have issues installing it on Windows.

Good luck with using PhenoScore in your research - be sure to let me know if there are other problems, are if things are unclear (in the documentation for instance), or missing etc.

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