Как собрать opencv под windows

от admin

Как собрать opencv под windows

This document contains instructions for installing and migrating to the latest release of OpenCV (version 3) and the Python bindings. In addition to some API changes, there are also changes to the Python interface (e.g. removal of cv2.cv ) that may require changes in existing code to work with the new version of the cv2 module. After installation, see the next page, Migration & Changes, for details regarding the changes to the module and for help migrating existing Python code to the new version.

This page covers installing OpenCV 3 on Windows (using pre-built binaries) and Linux (compiled from source), including the Python interface (the cv2 module). OpenCV can be downloaded from the official OpenCV website. Note that this guide is written based on OpenCV version 3.1.0. After installation, it is recommended that you can check the version of OpenCV that Python is using:

Note that although OpenCV 3 is the latest release, by convention, the module is still named cv2 .

Installing on Windows (pre-built binaries)

Using pre-built binaries is the quickest way to get a Python OpenCV environment up and running on Windows. Currently, only the Python 2 version of the cv2 module is built and included in the latest Windows release. Support for Python 3 (as well as adding other non-standard features/modules), requires compiling from source — see the official OpenCV documentation for details.

Downloading OpenCV and Python

To begin, download OpenCV for Windows (version 3.1, opencv-3.1.0.exe ), and extract it to a directory of your choice. The Windows build includes both a 32-bit and 64-bit module for Python 2.7.

Before continuing, ensure that you have a working Python 2.7 installation, which can be downloaded from the Python website. This guide was tested using Python 2.7.9 (x86 installer / x64 installer). When installing, it is recommended that you allow the installer to add Python to your PATH environment variable, so you can run python and pip from a command prompt.

Installing Module Dependencies

The Python OpenCV cv2 module requires both the NumPy and SciPy stack. To get this, first ensure that you have a working python environment, and have pip installed (if not, use the links above, and ensure the Python folder is in your PATH variable).

Christoph Gohlke currently provides some (unofficial) pre-built Python packages for Windows, including NumPy and SciPy. Download the latest stable versions of NumPy and SciPy, and install them by calling pip install [module].whl from a command prompt. Note that you should download the version corresponding to your Python environment (2.7 in this case) and word length. For example, on 32-bit systems/interpreters:

And for 64-bit systems/interpreters:

After installing, you should be able to run import numpy and import scipy from a Python interpreter to verify that the modules were installed correctly. You can check what versions of NumPy and SciPy are installed from numpy.__version__ and scipy.__version__ , respectively.

Installing Python-OpenCV Module

Lastly, we need to copy the OpenCV module into the local Python packages. In the files extracted from opencv-3.0.0-rc1.exe , go to the folder opencv\build\python\2.7\ , and open either the x86\ (for 32-bit) or x64\ (for 64-bit) folder. In each, there will be a cv2.pyd file.

Copy cv2.pyd directly into the Lib\site-packages\ directory of your Python installation. For most users, this will be found at:

Lastly, ensure that the OpenCV .dll files are somewhere in your system’s %PATH% , especially the opencv_ffmpeg310.dll (or opencv_ffmpeg310_64.dll for 64-bit systems) file required for loading video files.

Continue on to the Verifying Installation section to ensure everything was installed correctly, and the new version of OpenCV is being used. Also be sure to check out the next page, Migration & Changes, for details about the changes to the module and updating existing code.

Installing on Linux (compiling from source)

Although this guide is written for Ubuntu 12.04/14.04 and other variants (e.g. Xubuntu/Lubuntu/Kubuntu), the process should largely be the same on other versions, as well as similar Debian-like Linux distributions. Pay attention to the output of each command to ensure everything worked correctly, and if there are any issues during the build process, see the bottom of this document for possible mitigations

Downloading OpenCV

To begin, download OpenCV for Linux (version 3.1.0, opencv-3.1.0.zip ), and extract it to a directory of your choice (e.g.

/opencv-src ). Create a build folder inside the folder where the archive was extracted (the directory containing the CMakeLists.txt file), and open a terminal session there. For example:

Execute all of following commands from the build sub-folder itself, so the compiled files will be placed there.

Installing Build Dependencies

To compile OpenCV, we must ensure that the required dependencies are available, including the build tools themselves. We can get the required ones using apt on Ubuntu, but first, ensure the package list is up-to-date by running apt-get update . Next, execute the following commands to get the required packages (see below for a one-line list of all):

Note that for additional OpenCV modules/features (e.g. GPU/CUDA support, or Python 3 module), you will need to download the respective development/SDK packages for those libraries as well. The dependencies listed above only cover building OpenCV itself and the Python 2.7 cv2 module.

Compiling and Installing OpenCV

Now that we have the required build dependencies, run cmake (again, in the build/ directory we created) to generate the Makefile to build OpenCV:

If there are any errors, ensure that you downloaded all the required packages — the output should help track down what is missing. To ensure the Python module will be built, you should see python2 in the list of configured modules after running cmake :

If you do not see the python2 module listed, in the «To be built» list, check that you have the proper Python development packages installed, remove all files from the build/ folder, and try running the cmake command again.

Now, we can build OpenCV (and the Python module) using make , and install it to our system:

Ensure that the build was successful after calling make , and check the output before installing. If you run into build issues/errors, again ensure that you have all the required dependencies and header files on your system. If there are actual build issues with OpenCV itself, see the Linux Build Issues section below for some possible workarounds.

When installing OpenCV 3.0-rc1 on Ubuntu 12.04, I ran into build errors regarding some missing codec #define entries. As mentioned, the steps to do this are detailed below should you run into the same problem (the problem should be solved in version 3.1.0 and above). Ubuntu 14.04 and above should build successfully without requiring any modifications.

If the build was successful, but you can’t import cv2 from a Python shell after running make install , you can install the module manually by copying the cv2.so file we just built in the build/lib/ folder to /usr/local/lib/python2.7/dist-packages/ . From the build/ folder, this can be done by:

After this step, the cv2 module is installed, and can now be imported by your Python environment. Continue on to the Verifying Installation section to ensure everything was installed correctly, and more importantly, that the correct version of OpenCV is being used by Python. You can also check out the next page, Migration & Changes, for details about changes to the cv2 module, and what changes need to be made to existing code to run with the updated module.

Verifying Installation

As mentioned previously, you can verify that the cv2 module was installed correctly by executing the following in a Python shell:

If the correct version string is printed ( 3.0.0-rc1 or newer if you used a more recent version), everything is installed correctly at this point!

Note that there are some major changes to the cv2 module hierarchy itself, and Python programs written with OpenCV 2.4.x in mind may not work properly anymore. See the next section, Migration & Changes for details about the changes, and how to modify programs to deal with the changes.

Linux Build Issues

On some systems you may run into issues when compiling OpenCV itself, depending on what packages are available. If the proper header files are available, but build issues still arise, try to see if there are any workarounds below for the problem.

Undefined AV_CODEC_ID_. in ffmpeg_codecs.hpp

If you run into an issue where build errors are caused by certain codecs not being defined, you can download a more recent version of ffmpeg_codecs.hpp from here, and replace it in the source code you downloaded/extracted in the modules/videoio/src/ folder.

Alternatively, you can declare them manually by editing the ffmpeg_codecs.hpp file itself by adding the missing codec entry for H263I , and renaming WNV to WNV1 . You can see what changes have to be made by viewing this commit from the OpenCV GitHub project.

Once the file is updated, you can call make again from the build/ folder, and OpenCV should finish compiling without error now.

Installation by Using the Pre-built Libraries

You can check the installation at the chosen path as you can see below.

Installation by Using git-bash (version>=2.14.1) and cmake (version >=3.9.1)

  1. You must download cmake (version >=3.9.1) and install it. You must add cmake to PATH variable during installation
  2. You must install git-bash (version>=2.14.1). Don’t add git to PATH variable during installation
  3. Run git-bash. You observe a command line window. Suppose you want to build opencv and opencv_contrib in c:/lib
  4. In git command line enter following command (if folder does not exist) :

Installation by Making Your Own Libraries from the Source Files

You may find the content of this tutorial also inside the following videos: Part 1 and Part 2, hosted on YouTube.

These videos above are long-obsolete and contain inaccurate information. Be careful, since solutions described in those videos are no longer supported and may even break your install.

If you are building your own libraries you can take the source files from our Git repository.

Building the OpenCV library from scratch requires a couple of tools installed beforehand:

  • An IDE of choice (preferably), or just a CC++ compiler that will actually make the binary files. Here we will use the Microsoft Visual Studio. However, you can use any other IDE that has a valid CC++ compiler. , which is a neat tool to make the project files (for your chosen IDE) from the OpenCV source files. It will also allow an easy configuration of the OpenCV build files, in order to make binary files that fits exactly to your needs.
  • Git to acquire the OpenCV source files. A good tool for this is TortoiseGit. Alternatively, you can just download an archived version of the source files from our page on Sourceforge

OpenCV may come in multiple flavors. There is a «core» section that will work on its own. Nevertheless, there is a couple of tools, libraries made by 3rd parties that offer services of which the OpenCV may take advantage. These will improve its capabilities in many ways. In order to use any of them, you need to download and install them on your system.

  • The Python libraries are required to build the Python interface of OpenCV. For now use the version 2.7. . This is also a must if you want to build the OpenCV documentation. is a scientific computing package for Python. Required for the Python interface. is used inside OpenCV for parallel code snippets. Using this will make sure that the OpenCV library will take advantage of all the cores you have in your system’s CPU. may be used to improve the performance of color conversion, Haar training and DFT functions of the OpenCV library. Watch out, since this is not a free service.
  • OpenCV offers a somewhat fancier and more useful graphical user interface, than the default one by using the Qt framework. For a quick overview of what this has to offer, look into the documentations highgui module, under the Qt New Functions section. Version 4.6 or later of the framework is required. is a C++ template library for linear algebra.
  • The latest CUDA Toolkit will allow you to use the power lying inside your GPU. This will drastically improve performance for some algorithms (e.g the HOG descriptor). Getting more and more of our algorithms to work on the GPUs is a constant effort of the OpenCV team. source files are required for the library to work with this high dynamic range (HDR) image file format.
  • The OpenNI Framework contains a set of open source APIs that provide support for natural interaction with devices via methods such as voice command recognition, hand gestures, and body motion tracking. Prebuilt binaries can be found here. The source code of OpenNI and OpenNI2 are also available on Github. is a documentation generator and is the tool that will actually create the OpenCV documentation.

Now we will describe the steps to follow for a full build (using all the above frameworks, tools and libraries). If you do not need the support for some of these, you can just freely skip this section.

Building the library

  1. Make sure you have a working IDE with a valid compiler. In case of the Microsoft Visual Studio just install it and make sure it starts up.
  2. Install CMake. Simply follow the wizard, no need to add it to the path. The default install options are OK.
  3. Download and install an up-to-date version of msysgit from its official site. There is also the portable version, which you need only to unpack to get access to the console version of Git. Supposing that for some of us it could be quite enough.
  4. Install TortoiseGit. Choose the 32 or 64 bit version according to the type of OS you work in. While installing, locate your msysgit (if it does not do that automatically). Follow the wizard – the default options are OK for the most part.
  5. Choose a directory in your file system, where you will download the OpenCV libraries to. I recommend creating a new one that has short path and no special characters in it, for example D:/OpenCV . For this tutorial, I will suggest you do so. If you use your own path and know, what you are doing – it is OK.
    1. Clone the repository to the selected directory. After clicking Clone button, a window will appear where you can select from what repository you want to download source files (https://github.com/opencv/opencv.git) and to what directory ( D:/OpenCV ).
    2. Push the OK button and be patient as the repository is quite a heavy download. It will take some time depending on your Internet connection.

    For the Intel Threading Building Blocks (TBB) download the source files and extract it inside a directory on your system. For example let there be D:/OpenCV/dep . For installing the Intel Integrated Performance Primitives (IPP) the story is the same. For extracting the archives, I recommend using the 7-Zip application.

    IntelTBB.png

    In case of the Qt framework you need to build yourself the binary files (unless you use the Microsoft Visual Studio 2008 with 32 bit compiler). To do this go to the Qt Downloads page. Download the source files (not the installers. ):

    qtDownloadThisPackage.png

    Extract it into a nice and short named directory like D:/OpenCV/dep/qt/ . Then you need to build it. Start up a Visual Studio Command Prompt (2010) by using the start menu search (or navigate through the start menu All Programs –> Microsoft Visual Studio 2010 –> Visual Studio Tools –> Visual Studio Command Prompt (2010)).

    visualstudiocommandprompt.jpg

    Now navigate to the extracted folder and enter inside it by using this console window. You should have a folder containing files like Install, Make and so on. Use the dir command to list files inside your current directory. Once arrived at this directory enter the following command:

    Completing this will take around 10-20 minutes. Then enter the next command that will take a lot longer (can easily take even more than a full hour):

    After this set the Qt environment variables using the following command on Windows 7:

    Also, add the built binary files path to the system path by using the PathEditor. In our case this is D:/OpenCV/dep/qt/qt-everywhere-opensource-src-4.7.3/bin .

    Now start the CMake (cmake-gui). You may again enter it in the start menu search or get it from the All Programs –> CMake 2.8 –> CMake (cmake-gui). First, select the directory for the source files of the OpenCV library (1). Then, specify a directory where you will build the binary files for OpenCV (2).

    CMakeSelectBin.jpg

    Press the Configure button to specify the compiler (and IDE) you want to use. Note that in case you can choose between different compilers for making either 64 bit or 32 bit libraries. Select the one you use in your application development.

    CMake_Configure_Windows.jpg

    CMake will start out and based on your system variables will try to automatically locate as many packages as possible. You can modify the packages to use for the build in the WITH –> WITH_X menu points (where X is the package abbreviation). Here are a list of current packages you can turn on or off:

    CMakeBuildWithWindowsGUI.jpg

    Select all the packages you want to use and press again the Configure button. For an easier overview of the build options make sure the Grouped option under the binary directory selection is turned on. For some of the packages CMake may not find all of the required files or directories. In case of these, CMake will throw an error in its output window (located at the bottom of the GUI) and set its field values to not found constants. For example:

    CMakePackageNotFoundWindows.jpg

    CMakeOutputPackageNotFound.jpg

    For these you need to manually set the queried directories or files path. After this press again the Configure button to see if the value entered by you was accepted or not. Do this until all entries are good and you cannot see errors in the field/value or the output part of the GUI. Now I want to emphasize an option that you will definitely love: ENABLE –> ENABLE_SOLUTION_FOLDERS. OpenCV will create many-many projects and turning this option will make sure that they are categorized inside directories in the Solution Explorer. It is a must have feature, if you ask me.

    CMakeBuildOptionsOpenCV.jpg

    Furthermore, you need to select what part of OpenCV you want to build.

    • BUILD_DOCS -> It creates two projects for building the documentation of OpenCV (there will be a separate project for building the HTML and the PDF files). Note that these are not built together with the solution. You need to make an explicit build project command on these to do so.
    • BUILD_EXAMPLES -> OpenCV comes with many example applications from which you may learn most of the libraries capabilities. This will also come handy to easily try out if OpenCV is fully functional on your computer.
    • BUILD_PACKAGE -> Prior to version 2.3 with this you could build a project that will build an OpenCV installer. With this, you can easily install your OpenCV flavor on other systems. For the latest source files of OpenCV, it generates a new project that simply creates a zip archive with OpenCV sources.
    • BUILD_SHARED_LIBS -> With this you can control to build DLL files (when turned on) or static library files (*.lib) otherwise.
    • BUILD_TESTS -> Each module of OpenCV has a test project assigned to it. Building these test projects is also a good way to try out, that the modules work just as expected on your system too.
    • BUILD_PERF_TESTS -> There are also performance tests for many OpenCV functions. If you are concerned about performance, build them and run.
    • BUILD_opencv_python -> Self-explanatory. Create the binaries to use OpenCV from the Python language.
    • BUILD_opencv_world -> Generate a single «opencv_world» binary (a shared or static library, depending on BUILD_SHARED_LIBS) including all the modules instead of a collection of separate binaries, one binary per module.

    Press again the Configure button and ensure no errors are reported. If this is the case, you can tell CMake to create the project files by pushing the Generate button. Go to the build directory and open the created OpenCV solution. Depending on just how much of the above options you have selected the solution may contain quite a lot of projects so be tolerant on the IDE at the startup. Now you need to build both the Release and the Debug binaries. Use the drop-down menu on your IDE to change to another of these after building for one of them.

    ChangeBuildVisualStudio.jpg

    In the end, you can observe the built binary files inside the bin directory:

    OpenCVBuildResultWindows.jpg

    For the documentation, you need to explicitly issue the build commands on the doxygen project for the HTML documentation. It will call Doxygen to do all the hard work. You can find the generated documentation inside the build/doc/doxygen/html .

    To collect the header and the binary files, that you will use during your own projects, into a separate directory (similarly to how the pre-built binaries ship) you need to explicitly build the Install project.

    WindowsBuildInstall.png

    This will create an Install directory inside the Build one collecting all the built binaries into a single place. Use this only after you built both the Release and Debug versions.

    To test your build just go into the Build/bin/Debug or Build/bin/Release directory and start a couple of applications like the contours.exe. If they run, you are done. Otherwise, something definitely went awfully wrong. In this case you should contact us at our Q&A forum. If everything is okay, the contours.exe output should resemble the following image (if built with Qt support):

    WindowsQtContoursOutput.png

    Set the OpenCV environment variable and add it to the systems path

    First, we set an environment variable to make our work easier. This will hold the build directory of our OpenCV library that we use in our projects. Start up a command window and enter:

    Install OpenCV from source on Windows – C++ / Python

    Install OpenCV 3 on Windows

    OpenCV released OpenCV-3.4.4 and OpenCV-4.0.0 on 20th November. There have been a lot of bug fixes and other changes in these versions. The release highlights are as follows:

    • OpenCV is now C++11 library and requires C++11-compliant compiler. Minimum required CMake version has been raised to 3.5.1.
    • A lot of C API from OpenCV 1.x has been removed.
    • Persistence (storing and loading structured data to/from XML, YAML or JSON) in the core module has been completely reimplemented in C++ and lost the C API as well.
    • New module G-API has been added, it acts as an engine for very efficient graph-based image procesing pipelines.
    • dnn module now includes experimental Vulkan backend and supports networks in ONNX format.
    • The popular Kinect Fusion algorithm has been implemented and optimized for CPU and GPU (OpenCL)
      QR code detector and decoder have been added to the objdetect module.
    • Very efficient and yet high-quality DIS dense optical flow algorithm has been moved from opencv_contrib to the video module.

    In this post, we will provide an installation script to install OpenCV 4.0 (C++ and Python) on Windows.

    We will be using command prompt throughout the process.

    Before we jump into the technical stuff, let’s make sure we have all the right tools available.

    Master Generative AI for CV

    Step 0.1: Install Visual Studio

    Download and install Visual Studio 2017 community edition from https://visualstudio.microsoft.com/downloads/. Run the installer and click on Continue.

    Visual Studio Installer

    Once the download is complete, the installer state would look like the following.

    Visual Studio Installer Download Complete

    Next, we select the packages. We will select Desktop development with C++.

    Select Packages

    Finally, click on Install while downloading and wait while Visual Studio is installed.

    Step 0.2: Install CMake

    Please note that the version mentioned in the screenshots might be different from the latest versions available on the website. Please download the latest versions and treat the screenshots as reference.

    Download and install CMake v3.12.3 from https://cmake.org/download/.

    During installation select “Add CMake to system PATH

    Step 0.3: Install Anaconda (a python distribution)

    Download and install Anaconda 64-bit version from https://www.anaconda.com/download/#windows.

    While installing Anaconda make sure that you check both options:

    1. Add Anaconda to my PATH environment variable
    2. Register Anaconda as my default Python

    Add Anaconda to System PATH and make it default Python

    Step 0.4: Install Git for Windows

    Finally, we are going to install Git 64 bit for Windows from https://github.com/git-for-windows/git/releases/download/v2.19.0.windows.1/Git-2.19.0-64-bit.exe. Choose “Use Git from the Windows Command Promt“.

    Restart your system at this point before moving on with further steps.

    Download all the installation scripts provided in the Downloads section and put them in the same directory.

    Step 1: Install OpenCV

    Now it’s time to run that command line magic :).

    Open Windows PowerShell/ Command Prompt and go to the windows folder.

    Step 1

    Type python main.py and press Enter.

    Step 2

    The script will create a new batch script: installOpenCV_modified.bat.

    First, make sure that runScript.bat file is NOT present in the directory. Run del runScript.bat from command prompt to remove the file if it’s present.

    Next, type installOpenCV_modified.bat and press Enter.

    Step 3

    After completion you will get something similar to this.

    Step 4

    This will create a new batch script runScript.bat which will have all the necessary paths and instructions defined. But, these paths are in Windows format and CMake takes the paths in Unix format.

    So, we run, python modifyBatchScript.py to modify the path format.

    Step 5

    Finally, type finalScript.bat and press Enter.

    Step 6

    This step will take some time to build opencv. After completion you will get something similar to this.

    Step 8

    This will install the version of OpenCV you selected initially.

    Download Code To easily follow along this tutorial, please download code by clicking on the button below. It’s FREE!

    Step 2: Update user environment variable – OPENCV_DIR

    Press Start, type Environment variables and click on Edit the system environment variables.

    In the popup window, click on Environment Variables.

    Under System Variables, select Path and click edit.

    Add the complete path to the directory where OpenCV was installed. This can be found at as:

    Click New, and give path to OPENCV_PATH\Installation\x64\vc14\bin and click Ok. Depending upon where you have kept opencv folder and what version of Visual Studio you used to compile OpenCV, this path would be different.

    In my case full path is:

    C:\Users\Administrator\Documents\OpenCV_Installation_4\opencv-master\Installation\x64\vc14\bin

    Click OK to save. Do NOT close the Environment Variables window.

    In User variables, click on New, under Variable name:, enter OPENCV_DIR and under Variable value:, enter the path to the install directory of OpenCV.

    In my case variable value is:

    C:\Users\Administrator\Documents\OpenCV_Installation_4\opencv-master\Installation\x64\vc14\staticlib

    This directory contains file “OpenCVConfig.cmake”. This is used by CMake to configure OpenCV_LIBS and OpenCV_INCLUDE_DIRS variables to generate project files.

    Click on OK, and click on OK again to close Environment Variables window.

    If you have an open Command Prompt/Power Shell window before these values were updated, you have to close and open a new Command Prompt/Power Shell window again.

    Step 3: Test installation for Python 3

    To test your installation, press Start, enter Command Line, and type:

    Once you have activated the Python environment, we start an IPython prompt.

    In IPython prompt, enter:

    Hope you enjoy this script �� In case of any queries, feel free to comment below and we will get back to you as soon as possible.

    Subscribe & Download Code

    If you liked this article and would like to download code (C++ and Python) and example images used in this post, please click here. Alternately, sign up to receive a free Computer Vision Resource Guide. In our newsletter, we share OpenCV tutorials and examples written in C++/Python, and Computer Vision and Machine Learning algorithms and news.

    Introduction

    Opencv is an extremely useful library in Computer Vision. A common issue which python programmers face with the Opencv module is, if we install it directly with “pip” or “conda” it uses CPU for Inferencing. Opencv has deeplearning module “DNN” which by-default uses CPU for its computation.
    Opencv with GPU access will improve the performance multiple times depending on the GPU’s capability. For this to work we have to compile the source code of Opencv with Nvidia GPU, CUDA, and cuDNN by using tools like CMake and Visual Studio which uses c++’s GCC compiler.
    The main reason why I made this blog is that it consumes a huge amount of time, searching for installation and I found there is no proper documentation for my case. It's easy to install Opencv on the Linux machine but it is hard for Windows.
    For installing Opencv on Linux machine:
    https://www.pyimagesearch.com/2016/07/11/compiling-opencv-with-cuda-support/
    This blog is for building OpenCV from the source in Windows Machine

    Our Instance’s specifications

    Just for a reference, I am building OpenCV in a <AWS-EC2-g4.xlarge> with a Windows AMI instance with a Tesla T4 GPU with a capacity of 16gb and 4 core CPU. I’m accessing this instance through an RDP(Remote Desktop Protocol) connection from my local Linux machine.
    Anyway, This blog just cares for a Windows machine with a Good GPU

    Steps at an Abstract Level (just for reference)

    You can click on these sublinks to directly jump to that step

    Steps

    The main idea here is to download the opencv and opencv-contrib package from the source. Then configure and compile (build) the packages through CMake and visual studio in a folder named “build”.

    1. Download and install Visual Studio 19

    1.1. Download latest Community edition Visual Studio, In my case, it is VS19:- https://visualstudio.microsoft.com/downloads/
    1.2. Click on Desktop development with C++, and Continue with defaults and install

    2. Download and install CMake (my version 3.18.3)

    3. Install CUDA and cuDNN according to your GPU

    3.1. Click on my another link :- https://medium.com/@ankitkumar60323/installing-cuda-and-cudnn-on-windows-d44b8e9876b5
    3.2. Follow this wikipedia page for getting architecture binary of your gpu
    https://en.wikipedia.org/wiki/CUDA
    In my case architecture binary is 7.5. CUDA version is 10.1 and cuDNN version is 7.6.5.

    4. Uninstall Anaconda and install python for all user

    There will be path issues if we do not follow this part
    4.1. Goto “Installed programs” and uninstall anaconda and python
    4.2. Check the “system environment variables” and remove anaconda and python form the path

    4.3. Now install python and proceed with “custom installation” with all user permissions

    4.4. Check in command prompt if “python” is detected and if not then give path to python executable in “system environment variables”

    Читать:
    Почему не видит мышку компьютер

Похожие статьи