Can't even get started in Visual Studio.
I have written the first 3 lines of code in this video in a file called "capstone_solution.py".
import numpy as np
I am already stuck. It says capstone_solution is not defined. I have saved the file, though. What should I do?
Delete the line
You don't need it :) The lines of code are numbered 1, 2, 3, etc, so the code begins with importing the
Unfortunately, I can't even figure that out.
I think I installed cv2, but I don't even know that for sure because Python is not recognizing numpy. Please help.
I believe you have performed the steps for creating a new python environment, but let me outline them again.
conda create -n capstone
which creates a new environment called
capstone. You will be asked to press
y to proceed. Next, type
which will activate the
capstone environment. If you then write
conda env list
you will get a list of all environments and a star will indicate the one you are currently in.
After activating the
capstone environment, write
conda install -c conda-forge opencv
You would again need to press
y to proceed. After the installation is complete (it may take a minute or two), type
The output should be as follows:
You see that both
numpy have been installed.
Now, go to Visual Studio and make sure that you are working withing the
capstone environment, where both
opencv are installed. If you are opening Visual Studio from the Anaconda Navigator, then make sure that you have chosen
capstone from the drop-down menu (in Giles' case, the environment is called
If not, then please, follow the instructions on the following link.
I hope this helps! In case you run into a problem, don't hesitate to share it!