Getting Started with Python installation of third-party modules

Getting Started with Python installation of third-party modules

Platform: Win x64 + Anaconda3-5.3.0 (+ Python3.7.0)

 

Issue Description: pip install line_profiler-2.1.2-CP37-cp37m-win_amd64.whl error pip version is too low, you need to update 1.19.0, while the current version is 0.9.0

The reason: while watching "Python Data Science Handbook", the book P24 need to install line_profiler (third-party modules for the code line by line analysis), download third-party modules: line_profiler-2.1.2-cp37-cp37m -win_amd64.whl, in the downloaded third-party modules folder pip install line_profiler-2.1.2-cp37- cp37m-win_amd64.whl error

Solution: Python version comes pip too long, you need to install the upgrade

 

table of Contents:

First, third-party modules Download Summary

Two, Issue Summary middle encountered

Three, pip install Python offline installation package recommendations

 

First, third-party modules Download the summary:

1. https://www.lfd.uci.edu/~gohlke/pythonlibs/ or https://www.lfd.uci.edu/~gohlke/pythonlibs/#pytz

Package versions listed clearly, more and more, but some packages (such as memory_profiler) no

2.https://pypi.doubanio.com/simple/

Pack more, but less version

3.https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/

Various versions of a multi-pack, but some packages (such as memory_profiler) no

4. Download the latest pip: https://pypi.python.org/pypi/pip

After the update is good pip, use pip install *** installation. Depending on the network issues, but many can be installed successfully.

 

Two, Issue middle encountered a summary:

1. Download Which whl?

1) First figure out what your Python version, in order to facilitate subsequent .whl download the appropriate file.
running into the win + R command window, open type cmd command prompt, and then input to python

Mine is:

C:\Users\wang>python
Python 3.7.0 (default, Jun 28 2018, 08:04:48) [MSC v.1912 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

Clear: This is my version of Python 3.7.0, AMD64

 

2. Select the desired file to download .whl, generally opt for the final, which means feeling recently updated package, the following is .whl file download link address :
http://www.lfd.uci.edu/~gohlke/pythonlibs/
I is selected so that the bit 3.7.0,64 line_profiler-2.1.2-cp37-cp37m- win_amd64.whl

 

3. In the downloaded third-party modules folder pip install line_profiler-2.1.2-cp37- cp37m-win_amd64.whl error, be aware of the need to update Pip

 

4. Update PIP :

Download the latest pip: https://pypi.python.org/pypi/pip

Download Files downloaded into the latest pip

I downloaded: PIP-19.2.2-py2.py3-none-any.whl

In the downloaded third-party modules folder PIP install PIP-19.2.2-py2.py3-none-any.whl update, error:

 

5.更新pip报错:ERROR: To modify pip, please run the following command:
C:\Users\wang\Anaconda3\python.exe -m pip install .\pip-19.2.2-py2.py3-none-any.whl
You are using pip version 10.0.1, however version 19.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Solution: the error message shows the command is incorrect, you need to perform: C:. \ The Users \ wang \ Anaconda3 \ python.exe -m PIP install \ PIP-19.2.2-py2.py3-none-any.whl

  In the downloaded third-party modules folder C:. \ Users \ wang \ Anaconda3 \ python.exe -m pip install \ pip-19.2.2-py2.py3-none-any.whl update

wait.....

提示:Processing d:\software\appbeifen\software_pro\python\mokuai\pip-19.2.2-py2.py3-none-any.whl
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.
mysql-connector-python 8.0.15 requires protobuf>=3.0.0, which is not installed.
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
Successfully installed pip-19.2.2

It can be seen: the update is successful. And by pip list view pip version 19.2.2

 

6. Download a good third-party modules folder line_profiler-2.1.2-cp37-cp37m- win_amd64.whl install pip install

wait.....

提示:Installing collected packages: line-profiler
Successfully installed line-profiler-2.1.2

It can be seen: the update is successful. And through the viewing line-profiler for the 2.1.2 version pip list

 

7. Install success.

 

 

Three, pip install the offline installation package Python suggestions:

1. Using Python pip mounted off the network installation package Offline Environment: https://www.cnblogs.com/michael-xiang/p/5690746.html

Tips: When you encountered an unknown error can not install the package, you can go back to consider the following recommendations:
to find ways to update the version of Python! ! !
If you can not update the version of Python,
think of ways to pip updated version! ! !

Recommended reason: 1) installed on the need to develop a networked machine can pack 2) package installed packages 3) offline installation package packaged

 

Guess you like

Origin www.cnblogs.com/Alliswell-WP/p/PythonOfPipInstall.html