0

I try to install GPLearn to run in Python.

I have used pip to install GPLearn by the command:

pip install gplearn

Everything seems to work fine

When starting a new python project in VS2019 and running the code

import gplearn
print('ok')

This gives the error No module named 'gplearn'.

Tried the exact same approach with Scikit-learn and it worked just fine.

user1590336
  • 109
  • 1
  • 9

1 Answers1

1

It's likely the version of pip used to install gplearn is not the same version of python you are using in VS2019.

Try the top answer found here: "ImportError: No module named httplib2" even after installation

  • That can actually be the problem! Python version for VS2019 are 3.7 and if I'm running "python" in command prompt it states 3.6.4. – user1590336 Jun 18 '19 at 19:01
  • Now I have reinstalled everything, Python (+ pip), gplearn (+ dependencies) and unfortunately, I still get the same error. The version of python is now 3.7.3, however. – user1590336 Jun 19 '19 at 06:21
  • Is it possible you need to change the python environment? Check out this [article](https://learn.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-05-installing-packages?view=vs-2019) – Ray Michaels Jun 25 '19 at 16:31