Tag Archives: pip

Mac OS uses pip to install pandas prompt cannot install ‘numpy’ solution

When I was rebuilding my computer’s plotly environment, I encountered a problem, that is, when I used pip to install pandas, I always prompted:

pip uninstall numpy
Cannot uninstall 'numpy'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Due to the limited level of English, at the beginning of the period, I thought it was due to insufficient authority, and sudo still reported an error. After translating with the help of tools, it is found that numpy cannot be unloaded for the following reasons:

This is a distutils installed project, so we cannot determine exactly which files belong to it, which would result in only a partial uninstallation.

Numpy is a standard library. It reminds me that some software in the windows system will be placed in the system folder when it is installed. As a result, the prompt can not accurately identify the files that need to be unloaded and deleted, resulting in the failure of unloading. Although it is not clear why numpy needs to be uninstalled before pandas is installed, PIP is used to install a wave first. The tips are as follows:

Requirement already satisfied: numpy in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (1.8.0rc1)

Still can’t, simply delete directly. To remind you, backup first, and then install numpy again after installation, so it’s safer

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ ls | grep numpy
numpy-1.8.0rc1-py2.7.egg-info
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$ sudo mv numpy-1.8.0rc1-py2.7.egg-info /Users/fv/
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python$

There are also some pitfalls: looking at the foreign netizens, there are many bugs in the version of 3. + and I really want to roll back to 2.4. New computers must pay attention to the version of the relevant dependency library. Sometimes the plot prompt can’t find the module, just because the version is too low

[Solved] Fatal error in launcher: unable to create process using ‘”‘

 

Coexistence environment of python3 and python2 under win7

Installing a package with pip
When executing pip2 install xxx, an error is reported
Fatal error in launcher: Unable to create process using '"'

The same error is reported when executing pip3 install xxx
Fatal error in launcher: Unable to create process using '"'


Solution
python2 -m pip install XXX
python3 -m pip install XXX

This will allow you to use pip to install the module properly

How to install PIP in no module named setuptools

ImportError: No module named setuptools [How to Solve]

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz –no-check-certificate

tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11
python setup.py build
python setup.py install

pip install

wget--no-check-certificatehttps://github.com/pypa/pip/archive/1.5.5.tar.gz

Note: when WGet gets HTTPS: – – no check certificate should be added

tarzvxf1.5.5.tar.gz#unzip file cdpip-1.5.5/
pythonsetup.pyinstall

OK, so pip is installed

Let’s install requests

pipinstallrequests

 

Windows: PIP Install error: Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat

Just after installing PIP in Windows environment on the machine, it is convenient to use it when installing the package in the future. Who knows that when using pip to install asyncio for the first time, it will report an error

when using PIP installation package under windows7x64, you will be prompted to report an error: Microsoft Visual C + + 9.0 is required (unable to find vcfarsall. Bat)

environment: windows7 x64, python2.7, vs2012

reason: when using PIP installation package under windows, you need VS2008 installed on the machine, but vs2012 is not enough, if you don’t want to install VS2008, You can install a package of Micorsoft Visual C + + compiler for Python 2.7

Upgrade pip Error: ”’SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED]…”

Upgraded pip and encountered the following error reported.

PS C:\temp> python -m pip install –upgrade pip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)’))’: /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)’))’: /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)’))’: /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)’))’: /simple/pip/
ERROR: Operation cancelled by user
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1108)’))) – skipping

 

The solution is to specify the trusted host, as follows.

PS C:\temp> python -m pip install –upgrade pip –trusted-host pypi.org –trusted-host files.pythonhosted.org
Collecting pip
Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
|████████████████████████████████| 1.5MB 242kB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.1.1

 

Pip Install Error:There was a problem confirming ssl certificate

PIP install installs the third-party plug-in, and the URL of “could not fetch” appears https://pypi.python.org/simple/pool/ : there was a problem confirming SSL certificate

The solution is as follows:
create pip.ini in the python installation directory, and the configuration content of pip.ini is as follows:
0

[global]

index-url=http://mirrors.aliyun.com/pypi/simple/

[install]

trusted-host=mirrors.aliyun.com

The environment variable has configured the path of Python in the path, so there is no need to configure the path here, and then download the third-party plug-in with PIP

Solution to fatal error in launcher: unable to create process using ‘”‘In PIP installation

When using pip to install modules in

python, the following message appears: fatal error in launcher: unable to create process using ‘”‘

appears

reason: PIP may be installed in many places in the system, and all of them are added to the environment variables

in the system

solution:

1. Check whether the path of PIP command is repeated: CMD command: where pip, there are multiple paths as follows

1

2. Copy the environment variable path to TXT, remove the unnecessary related path, save it, reopen the console, and use PIP again to install

2

multi version PIP usage:

if you really need to have multiple pips in the environment, for example, if you have installed python2 and python3 at the same time, you can refer to the following method to install

with the pip of the specified version of Python

python2 -m pip install xxx

or

python3 -m pip install xxx

ultimate solution:

reason: it needs to be used like this in Windows environment, – I don’t understand the reason, and the Python – M instruction can’t find the exact meaning

either

there are also hints that it’s a problem with the PIP version. Just update the pip to the latest version. The update command is “Python – M PIP install — upgrade PIP”

reference source:

A B

Centos7 Install virtualenv Error bash: virtualenv: command not found…

After installing python3

1. Install virtualenv with PIP3

pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple virtualenv

The above image has been installed successfully

2. Virtualenv: command not found

3. Add environment variable to solve the problem

(1) Using find/- name ‘ virtualenv.py ‘does it exist

It can be found in the figure below

(2) Add environment variable

Steps:

vim /etc/profile
# Add the following to the bottom of the file
PATH=$PATH:/usr/local/python3/bin

# is the command added to take effect
source /etc/profile

# Finally, check if the file was added successfully
echo $PATH

Example card:

(3)Reuse virtual env

# Use virtualenv to create a python3 environment with the command demo1
virtualenv --python=/usr/bin/python3 demo1
# Go to /demo1/bin under the virtual slow directory and start the virtual environment with the command
source activate