I've just installed Visual Studio Community with the workloads for Python and Data Science.
I create a new Regression project from the Python\Machine Learning template.
The first few lines are:
from pandas import read_table
import numpy as np
import matplotlib.pyplot as plt
First I get the errors: No module named xxx
or Missing required dependencies [xxx]
, for pandas or numpy, or scikitlearn or scipy.
I would have expected these to be installed as part of the Visual Studio workloads, and indeed they seem to be in the Anaconda3\Lib\sitpackages
folder, if that's where they should be. But I tried installing them anyway from the Python Environments window in VS.
If I'm lucky, then I get past the above error to this one: Importing the multiarray numpy extension module failed.
.
Anyone got any pointers for setting this up?
To install numpy, select pip from the dropdown for Python Environment, then type numpy and click on the “install numpy from PyPI” as shown below. Similarly search for scipy and install it using pip. If you get any errors in installing scipy, then download first anaconda from the following site.
This is how I got it to work: Right click on "Python Environments" on the solution explorer window. Select Add/Remove python environments and then pick an environment that has the right packages selected or add packages as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With