+ 2

Help with pypi

It's really common issue for me that pypi doesn't find the package that I'm trying to install. It's SSL certification 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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)'))) - skipping For now i've been installing pip packages using wheel files. Adding pypi as trusted host doesn't work. Running it as adminstration doesn't work ether I tried to reinstall pypi using this file. https://bootstrap.pypa.io/get-pip.py It reinstalls pypi using its 18.1 wheel file. Didn't work.

2nd Dec 2018, 5:50 PM
Toni Isotalo
Toni Isotalo - avatar
2 Antworten
+ 2
I had to use trusted host parameters when installing the package pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org package_name I need a way to go around this.
2nd Dec 2018, 6:07 PM
Toni Isotalo
Toni Isotalo - avatar
- 2
The following  function used regular expression to remove the suffix from the words: def stem (word) regexp = r'^(.*?)(ing|ly|ed|ious|ies|ive|es|s|ment|ion)?
#x27; stem, suffix = re.findall(regexp, word)[0] return stem Using text1, do the following: Take only the words from text1 , transfer all words to lowercase, and put the output words in list name ListOfWords. Check that all words in ListOfWords are not stopwords. Define and use the stem function explained above to remove the suffix from the list ListOfWords and put the output words in the list name ListOfWords2. Sort the ListOfWords2 based on word frequency and print out the top 50 words. Hint in the output: [('whale', 1226), ('one', 921), ('like', 649), ('ship', 605), ('upon', 566), ('sea', 542), ('man', 531), ('ahab', 512), ('boat', 483), ('ye', 472), ('head', 466), ('seem', 464), ('old', 450), ('would', 432), ('whal', 400), ('though', 384), ('look', 366), ('hand', 357), ('captain', 353), ('yet', 345), ('long', 338), ('go', 338), ('time', 337), ('say', 330), ('great', 312), ('still', 312), ('see', 309), ('said', 304), ('two', 301), ('way', 291), ('must', 283), ('last', 283), ('white', 281), ('thou', 271), ('stubb', 261), ('round', 260), ('water', 260), ('day', 258), ('queequeg', 252), ('little', 249), ('three', 245), ('sperm', 244), ('men', 244), ('may', 240), ('first', 235), ('every', 232), ('well', 231), ('u', 230), ('much', 223), ('sail', 219)] Question 2 : (4 marks) Describe the class of strings matched by the following regular expressions: [a-zA-Z]+ [A-Z][a-z]* p[aeiou]{,2}t \d+(\.\d+)?
6th Dec 2018, 6:35 AM
zahra mohamed