Python Default call Path

Source: Internet
Author: User

Record a small problem encountered, to prevent the next encounter forget how to solve.

Cause: Pip installs the extension library when prompted for installation, but cannot import under Python terminal

Phenomenon: Personal mac above in the terminal directly run Python prompts as follows: (2.7.13) But when the/usr/bin/python entered is (2.7.10), and can be imported just PIP installation of the extension library

Resolution process:

#which python as follows

#/usr/local/bin/python

It's clear that Python first invokes/usr/local/bin/python instead of/usr/bin/python.

Workaround:

View/etc/paths File

Here I believe everyone guessed, the/usr/bin adjusted to/usr/local/bin above the terminal can be reopened.

Summary:

In fact, the problem is very simple, the difficult person will not, will not be difficult, in addition to Python, in fact, analogy with other tools, there may also be this problem.

# # #wayne The first blog simple record

Python Default call Path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.