tom-doerr / vim_codex

Supercharge your Vim editor with AI-powered code completion using OpenAI Codex. Boost productivity and save time with intelligent suggestions.
MIT License
258 stars 28 forks source link

cannot seem to get through the pip3 step #1

Closed feiliuesmf closed 3 years ago

feiliuesmf commented 3 years ago

Downloading/unpacking openai Downloading openai-0.10.2.tar.gz (156kB): 156kB downloaded Running setup.py (path:/tmp/pip_build_root/openai/setup.py) egg_info for package openai /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in openai setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers. Complete output from command python setup.py egg_info: /usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'python_requires'

warnings.warn(msg)

error in openai setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.


Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/openai Storing debug log for failure in /home/feiliu/.pip/pip.log

tom-doerr commented 3 years ago

I suspect your Python version is too old. Could you try to upgrade to a newer version, e.g. Python 3.8?

feiliuesmf commented 3 years ago

I am now using python 3.9.5 I got the following error message, what should I do now? Thanks!

pip3 install openai WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ Could not fetch URL https://pypi.org/simple/openai/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/openai/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement openai (from versions: none) ERROR: No matching distribution found for openai WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

On 8/30/2021 1:43 PM, Tom Dörr wrote:

I suspect your Python version is too old. Could you try to upgrade to a newer version, e.g. Python 3.8?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/vim_codex/issues/1#issuecomment-908549932, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAX7CQDYIPGVJBX3GDYE3TT7O7LJANCNFSM5DCJF6FA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tom-doerr commented 3 years ago

Could you try

pip3 install --upgrade
pip3 install ssl

? You might need to execute the commands with sudo prepended.

feiliuesmf commented 3 years ago

I have ssl.py installed as  part of python build. How do I enable this as part of pip3? I think that's the problem I am running into.

On 8/30/2021 2:31 PM, Tom Dörr wrote:

Could you try

|pip3 install --upgrade pip3 install ssl `` ? You might need to execute the commands withsudo` prepended. |

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/vim_codex/issues/1#issuecomment-908585003, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAX7CSK4STKYI7MEMDK6TLT7PFB5ANCNFSM5DCJF6FA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tom-doerr commented 3 years ago

You can execute pip as a module from within your new python environment like so:

python3 -m pip install openai
feiliuesmf commented 3 years ago

No luck, I am not sure why...

I have ssl here: /storage/install/gnu9/Python-3.9.5/lib/python3.9/ssl.py

/storage/install/gnu9/Python-3.9.5//bin/python3

python3 -m pip install openai WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/openai/ Could not fetch URL https://pypi.org/simple/openai/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/openai/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement openai (from versions: none) ERROR: No matching distribution found for openai WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

On 8/30/2021 2:56 PM, Tom Dörr wrote:

You can execute |pip| as a module from within your new python environment like so:

|python3 -m pip install openai |

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tom-doerr/vim_codex/issues/1#issuecomment-908601160, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAX7CXVOO75KCE66MQSYLTT7PH4VANCNFSM5DCJF6FA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tom-doerr commented 3 years ago

You could try to install a Python version that is newer than 3.4 but not as new as 3.9.5. The following versions work for me:

➜  vim_codex git:(main) ✗ python3 --version
Python 3.8.10
➜  vim_codex git:(main) ✗ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
tom-doerr commented 3 years ago

I assume the problem is fixed, feel free to reopen the issue if it still doesn't work.