[PYTHON] Import libraries that cannot be pip installed with PyCharm

Execution environment

Background

I introduced weiliu89's ssd-caffe on Ubuntu, but I couldn't import it well in PyCharm environment because I was a beginner around Python interpreter. did. I've solved it, so I'll keep a record.

This time, Caffe is imported, but cloned from github etc. should be able to be imported by the same procedure in general.

procedure

1. Set the interpreter with PyCharm

Open PyCharm, File-> Settings-> Project: Project Name-> Python Interpreter Will take you to the interpreter settings page.

By default, it may be Python2.7 / usr / bin / python2.7 (gray characters). You can change the Python version by switching here.

I think the packages installed below are listed.

2. Just add Path to the interpreter

Now let's add Path to the interpreter we want to use. Select Show All from the gear button on the right to see a list of available interpreters. With the one you want to use selected here, open "Display the path of the selected interpreter" at the bottom of the five icons on the right.

Then the path will be displayed in a row. This time I want to add Caffe, so press the add button and add "/ home / usrname / caffe / python" (depend on your environment).

Let's apply and check.

import caffe

Recommended Posts

Import libraries that cannot be pip installed with PyCharm
Measures that pip install cannot be done with pycharm or import ssl cannot be done
Options when installing libraries that cannot be piped with pyenv
Items that cannot be imported with sklearn
Investigation when import cannot be done with python
What to do if pip cannot be installed
List packages that can be updated with pip
PIL cannot be installed by virtualenv with pyenv
When pydub cannot be installed
Delete all libraries installed on pip with a single command
Examples and solutions that cannot be optimized well with scipy.optimize.least_squares
Problem that pip install cannot be done with pyenv + Yosemite (error: command'clang' failed with exit status 1)
A memorandum (masOS) that import tkinter could not be done with python installed from pyenv
TensorFlow 2.2 can't be installed with Python 3.8!
Remove all modules installed with pip
Install packages that need to be compiled with Python3 with pip [Windows]
Uninstall everything you installed with pip
Confirmation that rkhunter can be installed
Parallel computing (pathos) when dealing with objects that cannot be pickled
The module that should have been installed with pip does not run
Address to the bug that node.surface cannot be obtained with python3 + mecab
Python modules with "-(hyphen)" cannot be removed
About the matter that localhost: 4040 cannot be accessed after running Spark with Docker
De-VBA Excel tool! Eliminate VBA tool with Python in environment where Python cannot be installed
Project cannot be created with Python3.5 (Windows) + django1.7.1
When Html cannot be output with Jupyter Notebook
File types that can be used with Go
When contour map cannot be drawn with APLpy
"Temporary solution" when pip cannot be updated [Python]
Summary of examples that cannot be pyTorch backward
Python environment settings (virtualenv + pip cannot be done)
No module named'distutils.util' cannot be used with get-pip.py
The story that fits in with pip installation
The problem that the ifconfig command cannot be used
Workaround for the problem that UTF-8 Japanese mail cannot be sent with Flask-Mail (Python3)