[PYTHON] How to install pip, numpy in Autodesk MAYA

I'm quite addicted to it, so make a note of it. This is a personal MAYA setting method, so it probably won't work on machines without administrator privileges. It worked on Mac OS X when I ran it in the same way as this article, so I think it is useful information for Mac users.

usage environment

pip installation

get-pip.py is not included with mayapy by default, so you will need to download it manually. Download get-pip.py from here to a suitable location. (As of 08/22/2016)

Open the command prompt with administrator privileges in advance Change the current directory to C: / Program Files / Autodesk / Maya2016 / bin where mayapy is stored. (Different if the installation destination is not the default)

$ cd "C:/Program Files/Autodesk/Maya2016/bin"

Then run get-pip.py.

$ mayapy "(get-pip.Path to py)/get-pip.py"

At this point, the pip installation will begin. However, it seems that there are cases where it can be installed successfully and cases where it cannot be installed. If you're successful, leave the command prompt as it is, skip the rest of the article, and move on to Numpy settings.

If you couldn't download successfully, is the following error displayed in red?

UnicodeDecodeError: 'ascii' codec can't decode byte 0x8d in position 1: ordinal not in range(128)

This seems to be an error caused by the Japanese content in either directory or administrator name. To prevent this, place a script that customizes the settings in the mayapy site-packages folder. From My Computer, go to ** C: / Program Files / Autodesk / Maya2016 / Python / Lib / site-packages ** and go to Create a file called "** sitecustomize.py **" and write the following script.

sitecustomize.py


import sys
sys.setdefaultencoding("cp932")

Then run get-pip.py again and you should be able to install it successfully.

Install Numpy

If you have pip installed, the rest is easy. Write the following in the command prompt that remains open with administrator privileges. If you have closed the prompt, please reset the current directory to the folder where mayapy is located.

$ mayapy -m pip install --upgrade numpy

This completes the installation. Thank you for your hard work.

I will write the Mac version when I feel like it.

Recommended Posts

How to install pip, numpy in Autodesk MAYA
How to install pip
How to install mkl numpy
How to install mysql-connector with pip3
How to install NumPy on Raspberry Pi
How to install Python
How to install archlinux
How to install python
How to install BayesOpt
How to use numpy
How to install Nbextensions
How to install Prover9
How to operate NumPy
How to deal with "No module named'〇〇'" error in Jupyter Notebook | Install with! Pip!
What to do if pip install fails in Xcode 5.1
How to install Google Test / Google Mock in Visual Studio 2019
How to install poetry (error handling) in zsh environment
[2020.8 latest] How to install Python
How to install Python [Windows]
Tabpy 1.0 (2020-01 version) How to install
Pip install in proxy environment
How to install Pelican blog
How to develop in Python
[Road to intermediate Python] Install packages in bulk with pip
How to install python using anaconda
[Python] How to do PCA in Python
How to handle session in SQLAlchemy
How to install mysql-connector-python on mac
How to install and use Tesseract-OCR
How to use classes in Theano
How to write soberly in pandas
How to collect images in Python
Steps to install Ubuntu in VirtualBox
How to update Spyder in Anaconda
How to use SQLite in Python
How to install python-pip with ubuntu20.04LTS
How to install graph-tool on macOS
How to install wkhtmltopdf (Amazon Linux2)
How to install VMware-Tools on Linux
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install MBDyn (Linux Ubuntu)
How to convert 0.5 to 1056964608 in one shot
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to reflect CSS in Django
How to install and configure blackbird
How to install CUDA and nvidia-driver
How to kill processes in bulk
How to install and use Graphviz
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
How to use PubChem in Python
How to run TensorFlow 1.0 code in 2.0
How to install Maven on CentOS
How to install Go on Ubuntu
How to handle Japanese in Python
How to log in to Docker + NGINX
How to install music 21 on windows
How to install Anaconda with pyenv