0

I cant use higher version of pip other than 20.2.4, since some SSL certification errors are occuring in higher versions and cannot reinstall any settings I have now (because of some office setup). Now I am using Pycaret and currently it supports only sklearn 0.23.2.

But my sklearn version is 0.24.1 and I am unable to downgrade it with 20.2.4 version of pip.

I also tried manual installation using setup.py file and it is also not success.

I am having Winpython and unable to install anaconda too.

Can someone help me to sort this problem? I am having python 3.9 . May be that is the problem?

Update:

Error message:
Collecting scikit-learn==0.23.2
  Using cached scikit-learn-0.23.2.tar.gz (7.2 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\me\Desktop\WPy64-3902\Scripts\python.exe' 'C:\Users\me\Desktop\WPy64-3902\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\me\AppData\Local\Temp\pip-build-env-w5t8h2zr\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation == '"'"'CPython'"'"'' 'numpy==1.14.0; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'CPython'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'scipy>=0.19.1'
       cwd: None
  Complete output (547 lines):
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation == "CPython"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX" and platform_python_implementation != "CPython"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
DOT
  • 309
  • 2
  • 11
  • 1
    can you post the error you're getting? is there a reason for not using the most recent version of pip? – Aaron Jun 07 '21 at 15:29
  • yes! I am getting SSL certification error while installing other packages after upgrading pip version. – DOT Jun 07 '21 at 15:31
  • You probably need to set the trusted host for pip - see [here](https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi) – falafelocelot Jun 07 '21 at 15:34
  • I tried .. after upgrading pip and running this, I got following error: 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(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1122)'))) - skipping – DOT Jun 07 '21 at 15:42
  • 1
    getting the right version of numpy seems to be the culprit here... sklearn 0.23 pre-dates python 3.9 and there's no updated entry for which numpy version to use in the pyproject.toml... bottleneck also has a problem here.. I think pip is then getting confused thinking there's multiple packages that have conflicting requirements of which numpy version is needed. is it popssible to bump the scikit-learn version in requirements.txt? I'm wondering if pycaret *really* needs the older version (it's only 1 version away from current) – Aaron Jun 07 '21 at 16:29
  • or you could make a python 3.8 env just for this... – Aaron Jun 07 '21 at 16:30
  • Yes! I will try with python 3.8 env and let me see ... Also will try your solution too... Thanks! – DOT Jun 07 '21 at 21:27

1 Answers1

2

I tried various things, and the best advice I can give you is don't bother with python 3.9 for this library; It's just not supported yet. Dependencies are not sorted out yet for pycaret yet on python 3.9, and they should probably make note of that on their github, but here's the process I went through to get it installed from a completely fresh computer (windows sandbox).

  • Get miniconda to handle environments (or full fat anaconda if you want). Conda treats python itself as a package making it easy to create env's with different python versions. The version doesn't matter too much, as you'll be creating an env with python 3.8. I used `Miniconda3 Windows 64-bit`.
  • Get the Microsoft visual studio c++ build tools. It's possible you won't need them now that we're moving back to 3.8, but it's just good to have for installing any libraries which aren't distributed as pre-built binaries.
  • Create and activate your env:
    C:\Users\WDAGUtilityAccount>conda create --name py38 python=3.8
    

    C:\Users\WDAGUtilityAccount>activate py38

  • Update setuptools then install pycaret
    (py38) C:\Users\WDAGUtilityAccount>pip install -U setuptools
    

    (py38) C:\Users\WDAGUtilityAccount>pip install pycaret

  • Test installation:
    (py38) C:\Users\WDAGUtilityAccount>python
    Python 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pycaret
    >>> #look ma; no errors :)
    
  • Aaron
    • 10,133
    • 1
    • 24
    • 40
    • I succesfully installed... But again I got ssl error while doing pip install... because recent pip and ssl certificate mismatch.. I think, I need to contact my admin regarding ssl certificate problem... – DOT Jun 14 '21 at 09:49
    • I just activated , c:\Miniconda3\Scripts\activate base... In base env, pip 20.2.4 and python 3.8 is there. So I am able to install new packages without ssl errors – DOT Jun 14 '21 at 10:15