Python fatal error trying to update

I am trying to upgrade pip to version 8.0.2 from version 7.1.2, however when I type python -m pip install --upgrade pipin the command line it returns:

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00007cf8 (most recent call first):  

My pip --versionreturns:

pip 7.1.2 from C:\Users\Owner\Anaconda3\lib\site-packages (python 3.5)

I am running Windows 10, a 64-bit operating system.

EDIT: Also, when I enter only pythonon the command line, it returns:

C:\Users\Owner>python
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00007cf8 (most recent call first):

And python "stops working."


EDIT 2: My WAY:

PATH = C:\Program Files (x86)\NVIDIA \PhysX\Common; C:\python27 \; C:\python27\Scripts; C:\Program (x86)\Python332 \; C:\ProgramData\Oracle\Java\javapath; C:\Program \ \Microsoft Shared\Windows Live; C:\Program Files (x86)\ \Microsoft Shared\Windows , C:\Windows\system32; C:\Windows, C:\Windows\System32\Wbem; C:\Windows\System32\WindowsPowerShell\v1.0 \; C:\Program (x86)\Windows Live\Shared; C:\Program Files (x86)\MiKTeX 2,9\MiKTeX\Bin \; C:\Python334\Tools\Scripts; C:\WINDOWS\system32; C:\WINDOWS; C:\WINDOWS\System32\Wbem; C:\WINDOWS\System32\WindowsPowerShell\v1.0 \; C:\Program
(X86)\Skype\Phone \; C:\Users\\Anaconda3; C:\Users\\Anaconda3\Scripts; C:\Users\\Anaconda3\Library\Bin


python, , , .

+4
3

python3.

python3 -m pip install --upgrade pip

Edit:

PATH, :

C:\>set PATH=C:\Program Files\Python 3.5;%PATH%
C:\>set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
C:\>python

C:\My_python_lib - .

, reset. , .

pip Windows, :

python -m pip install -U pip
+3

, , , . , PATH python 3.5. , PYTHONPATH, ​​ libs.

, : pythonpath Windows 7?

+2

MAC OSX ANACONDA

, . .

, .

0

Source: https://habr.com/ru/post/1627065/


All Articles