Install packages that need to be compiled with Python3 with pip [Windows]

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.

Build a virtual environment

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

Compiler installation

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

スクリーンショット 2017-07-27 12.28.22.png スクリーンショット 2017-07-27 12.32.39.png スクリーンショット 2017-07-27 12.33.09.png

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
スクリーンショット 2017-07-27 17.14.19.png

Recommended Posts

Install packages that need to be compiled with Python3 with pip [Windows]
[Python Windows] pip install with Python version
[Road to intermediate Python] Install packages in bulk with pip
List packages that can be updated with pip
How to install Python [Windows]
[Python] Allow pip3 packages to be imported on AWS Lambda
Install Python on Windows + pip + virtualenv
Unable to install Python with pyenv
How to install mysql-connector with pip3
What to do if you can't install pyaudio with pip #Python
[Kivy] How to install Kivy on Windows [Python]
When I tried to use pip with python, I was told that XML_SetHashSalt could not be found.
I want to pip install with PythonAnywhere
Install Python package management tool pip (Windows)
scipy stumbles with pip install on python 2.7.8
Install python on xserver to use pip
Manage python packages to install in containers
How to install python3 with docker centos
Let's install box2d-py with Windows 10 environment pip
Measures that pip install cannot be done with pycharm or import ssl cannot be done
Address to the bug that node.surface cannot be obtained with python3 + mecab
Project cannot be created with Python3.5 (Windows) + django1.7.1
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Convert Windows epoch values to date with python
[Python] How to install OpenCV on Anaconda [Windows]
Install ZIP version Python and pip on Windows 10
Steps to install your own library with pip
How to install a Python library that can be used by pharmaceutical companies
How to install Python
Installing packages with pip3
How to install pip
Import libraries that cannot be pip installed with PyCharm
Error with pip install
Python knowledge notes that can be used with AtCoder
Python starting with Windows 7
Make it easy to install the ROS2 development environment with pip install on Python venv
[Python] tkinter Code that is likely to be reused
Install Voluptuous with Python 2.5
Install python on windows
[Python] Introduction to web scraping | Summary of methods that can be used with webdriver
[Python] pandas Code that is likely to be reused
Install python with pyenv
Until you install TensorFlow-GPU with pip in Windows environment
Install scikit.learn with pip
Install Python (for Windows)
Problem that pip install cannot be done with pyenv + Yosemite (error: command'clang' failed with exit status 1)
Summary of things that need to be installed to run tf-pose-estimation
I want to be able to analyze data with Python (Part 3)
How to install NPI + send a message to line with python
Until you can install your own Python library with pip
Knowledge you need to know when programming competitive programming with Python2
I want to be able to analyze data with Python (Part 1)
Processing of python3 that seems to be usable in paiza
Steps to install a Git cloned package locally with pip
I want to be able to analyze data with Python (Part 4)
Install Jupiter Notebook on Windows with pip in proxy environment
I want to be able to analyze data with Python (Part 2)
The story that Python stopped working with VS Code (Windows 10)
Install packages that cannot use pip in Azure App Service
[Introduction to Udemy Python3 + Application] 51. Be careful with default arguments
Python with VS Code (Windows 10)