0

I have applied pip3 uninstall numpy multiple times, during uninstalling I got messages as

botocore 1.12.80 has requirement urllib3<1.25,>=1.20; python_version >= "3.4", but you'll have urllib3 1.25.3 which is incompatible.                                                  
tensorflow 1.10.0 has requirement numpy<=1.14.5,>=1.13.3, but you'll have numpy 1.17.0 which is incompatible.                                                                         
tensorflow 1.10.0 has requirement setuptools<=39.1.0, but you'll have setuptools 40.4.3 which is incompatible. 

I continue uninstalling, after that I tried to install many numpy versions (1.13.3, 1.14.5, 1.16.2,), to solve the issue, but installing a version removes the last installed one. I have many tensorflow models and now they doesn't work.

Here is the packages that I uninstalled:

Uninstalling numpy-1.13.3:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /usr/lib/python3/dist-packages/numpy                                                                                                                                              
    /usr/lib/python3/dist-packages/numpy-1.13.3.egg-info                                                                                                                              
Proceed (y/n)? y                                                                                                                                                                      
  Successfully uninstalled numpy-1.13.3   

Uninstalling numpy-1.14.5:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /usr/local/lib/python3.6/dist-packages/numpy-1.14.5.dist-info/*                                                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/.libs/libopenblasp-r0-39a31c03.2.18.so                                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/multiarray_tests.cpython-36m-x86_64-linux-gnu.so                                                                                
    /usr/local/lib/python3.6/dist-packages/numpy/core/operand_flag_tests.cpython-36m-x86_64-linux-gnu.so                                                                              
    /usr/local/lib/python3.6/dist-packages/numpy/core/struct_ufunc_test.cpython-36m-x86_64-linux-gnu.so                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/test_rational.cpython-36m-x86_64-linux-gnu.so                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/core/umath_tests.cpython-36m-x86_64-linux-gnu.so                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/*                                                                                                                 
Proceed (y/n)? y                                                                                                                                                                      
  Successfully uninstalled numpy-1.14.5  

Uninstalling numpy-1.14.5:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /usr/local/lib/python3.6/dist-packages/numpy-1.14.5.dist-info/*                                                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/.libs/libopenblasp-r0-39a31c03.2.18.so                                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/multiarray_tests.cpython-36m-x86_64-linux-gnu.so                                                                                
    /usr/local/lib/python3.6/dist-packages/numpy/core/operand_flag_tests.cpython-36m-x86_64-linux-gnu.so                                                                              
    /usr/local/lib/python3.6/dist-packages/numpy/core/struct_ufunc_test.cpython-36m-x86_64-linux-gnu.so                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/test_rational.cpython-36m-x86_64-linux-gnu.so                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/core/umath_tests.cpython-36m-x86_64-linux-gnu.so                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/*                                                                                                                 
Proceed (y/n)? y 

Uninstalling numpy-1.16.2:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /usr/bin/f2py                                                                                                                                                                     
    /usr/bin/f2py3                                                                                                                                                                    
    /usr/bin/f2py3.6                                                                                                                                                                  
    /usr/local/bin/f2py                                                                                                                                                               
    /usr/local/bin/f2py3                                                                                                                                                              
    /usr/local/bin/f2py3.6                                                                                                                                                            
    /usr/local/lib/python3.6/dist-packages/numpy-1.16.2.dist-info/*                                                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/*                                                                                                                                    
  Would not remove (might be manually added):                                                                                                                                         
    /usr/local/lib/python3.6/dist-packages/numpy/.libs/libopenblasp-r0-39a31c03.2.18.so                                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/multiarray_tests.cpython-36m-x86_64-linux-gnu.so                                                                                
    /usr/local/lib/python3.6/dist-packages/numpy/core/operand_flag_tests.cpython-36m-x86_64-linux-gnu.so                                                                              
    /usr/local/lib/python3.6/dist-packages/numpy/core/struct_ufunc_test.cpython-36m-x86_64-linux-gnu.so                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/test_rational.cpython-36m-x86_64-linux-gnu.so                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/core/umath_tests.cpython-36m-x86_64-linux-gnu.so                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/__init__.py                                                                                                       
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/decorators.py                                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/noseclasses.py                                                                                                    
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/nosetester.py                                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/parameterized.py                                                                                                  
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/utils.py                                                                                                          
Proceed (y/n)? y                                                                                                                                                                      
  Successfully uninstalled numpy-1.16.2 

  Uninstalling numpy-1.16.2:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /usr/bin/f2py                                                                                                                                                                     
    /usr/bin/f2py3                                                                                                                                                                    
    /usr/bin/f2py3.6                                                                                                                                                                  
    /usr/local/bin/f2py                                                                                                                                                               
    /usr/local/bin/f2py3                                                                                                                                                              
    /usr/local/bin/f2py3.6                                                                                                                                                            
    /usr/local/lib/python3.6/dist-packages/numpy-1.16.2.dist-info/*                                                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/*                                                                                                                                    
  Would not remove (might be manually added):                                                                                                                                         
    /usr/local/lib/python3.6/dist-packages/numpy/.libs/libopenblasp-r0-39a31c03.2.18.so                                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/multiarray_tests.cpython-36m-x86_64-linux-gnu.so                                                                                
    /usr/local/lib/python3.6/dist-packages/numpy/core/operand_flag_tests.cpython-36m-x86_64-linux-gnu.so                                                                              
    /usr/local/lib/python3.6/dist-packages/numpy/core/struct_ufunc_test.cpython-36m-x86_64-linux-gnu.so                                                                               
    /usr/local/lib/python3.6/dist-packages/numpy/core/test_rational.cpython-36m-x86_64-linux-gnu.so                                                                                   
    /usr/local/lib/python3.6/dist-packages/numpy/core/umath_tests.cpython-36m-x86_64-linux-gnu.so                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/__init__.py                                                                                                       
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/decorators.py                                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/noseclasses.py                                                                                                    
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/nosetester.py                                                                                                     
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/parameterized.py                                                                                                  
    /usr/local/lib/python3.6/dist-packages/numpy/testing/nose_tools/utils.py                                                                                                          
Proceed (y/n)? y  


Uninstalling numpy-1.16.4:                                                                                                                                                            
  Would remove:                                                                                                                                                                       
    /home/alphamale/.local/bin/f2py                                                                                                                                                   
    /home/alphamale/.local/bin/f2py3                                                                                                                                                  
    /home/alphamale/.local/bin/f2py3.6                                                                                                                                                
    /home/alphamale/.local/lib/python3.6/site-packages/numpy-1.16.4.dist-info/*                                                                                                       
    /home/alphamale/.local/lib/python3.6/site-packages/numpy/*                                                                                                                        
  Would not remove (might be manually added):                                                                                                                                         
    /home/alphamale/.local/lib/python3.6/site-packages/numpy/.libs/libopenblasp-r0-382c8f3a.3.5.dev.so                                                                                
Proceed (y/n)? y                                                                                                                                                                      
  Successfully uninstalled numpy-1.16.4 

Is there a way to restore pip3 as it was before I did these uninstalls?

UPDATE

the issue was fixed as follows: installing numpy==1.16.4, then upgrading as pip3 install --upgrade numpy==1.16.4

Ameera
  • 33
  • 5
  • 3
    Restoring the `pip` "as it was" is unfortunately not possible. In the future, I would suggest using Python virtual environments. Just create a new virtual environment and install everything again. You are going to save yourself a lot of time this way. – carobnodrvo Aug 27 '19 at 08:23
  • Agreed, I recommend to try and [uninstall everything](https://stackoverflow.com/questions/11248073/what-is-the-easiest-way-to-remove-all-packages-installed-by-pip), and restart in a virtualenv. – Nils Werner Aug 27 '19 at 08:33

0 Answers0