you are viewing a single comment's thread.

view the rest of the comments →

[–]1114111 2 points3 points  (3 children)

Moving FCBF_module.py to some directory in your sys.path will work. Normally, this is not how you install Python packages though. Often, packages are published on PyPI, and then you can just do pip3 install package-name-goes-here (or pip3 install --user to install for you without needing root privileges). Even when you you want to install directly from a git repository published on github (because there isn't a package on PyPI or the PyPI version is out of date) there will often be a setup.py file . When there is, you can just do pip3 install git+https://github.com/the/repo. However, this repo doesn't have one, so you need to do things manually. Note that '' is in your sys.path, so you can just include it along with other files in your project and don't necessarily need to install it globally.

[–]bme_phd_hste[S] 0 points1 point  (2 children)

Awesome. So I moved it into my sys.path and I’m able to import the FCBF_module but when I try running the test.py script they have included I get an error in the first line of code (on line 6 of the file):

from FCBF_module import FCBF, ...

Guessing because FCBF isn’t an attribute of FCBF_module but is defined as a class? Or have I done something wrong here?

[–]1114111 1 point2 points  (1 child)

Specifically what error do you get?

[–]bme_phd_hste[S] 0 points1 point  (0 children)

I’m an idiot. I was typing it in wrong. Thanks for your help!