For example, if you use a package called pycrypto on Windows, you need to compile it, so even if you normally type pip install pycrypto
, an error will be returned.
Therefore, compile using the Visual Studio Build Tool and then perform the installation work.
Installing the Visual Studio Build Tool requires some space, but the task itself is very easy.
Since it is just a trial operation, we will temporarily create and use a virtual environment. Run as administrator at the command prompt.
#Build a virtual environment
# conda create -n Virtual environment name python=3.5.3
conda create -n wxenv python=3.5.3
#When creating with a set of Anaconda
# conda create -n wxenv python=3.5.3 anaconda
#When checking the created environment
# conda info -e
# conda list -n wxenv
#When deleting the created virtual environment
# conda remove -n wxenv --all
Reference https://stackoverflow.com/questions/41724445/python-pip-on-windows-command-cl-exe-failed
Download Visual C ++ 2015 Build Tools from the URL below and Select "Custom" in the installer options, Check and install windows 10 sdk only
http://landinghub.visualstudio.com/visual-cpp-build-tools
Added after installation is complete Visual C++ 2015 x86 x64 Cross Build Tools Command Prompt Is started by "Run as administrator".
By the way, this tool group is C:\Program Files (x86)\Microsoft Visual C++ Build Tools It should be in the directory of.
# Visual C++ 2015 x86 x64 Cross Build Tools Command Prompt
#Run on
#Migrate to virtual environment
#activate Virtual environment name
activate wxenv
#Package installation
#pip install package name
pip install pycrypto
Recommended Posts