Python Forum
Installing Older Version Of Numpy & Pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing Older Version Of Numpy & Pandas
#1
Hi all,

I'm still pretty new to the world of Python. I'm using Pycharm and for the first time I'm trying to test a public project from Github. The requirements file list for this project has numpy version 1.16.4 and pandas version 0.24.2. I've tried unsuccessfully for days to install these versions in a new project (thought I'd try it to see if it works) and I get a huge range of errors (too long to paste here even or add as an attachment).

I've tried in the terminal:
pip install numpy==1.16.4
and
pip install pandas==0.24.2
Pardon my total ignorance, but since I'm using Python 3.11, is the likely reason that there's a compatibility issue with numpy 1.16.4 and pandas 0.24.2? I'm totally lost in how to troubleshoot this and what to do. I'm guessing you may need more information than I've listed here, so please let me know if I need to provide you with anything else as I don't know what else to list.

Thank you for your assistance.
Reply
#2
Is there any reason why you are loading a specific version of numpy and pandas?
if not, try pip install numpy and pip install pandas
(both from command line)

Also, to get a warm fuzzy feeling about actual verison being updated, run python -V and pip -V
Reply
#3
Hi Larz60+,

Thank you for your reply.

I'm trying to run this code from github: https://github.com/nittolese/gquestions

I think you need the older versions of numpy and pandas for it to work? (requirements.txt)
Reply
#4
both of those packages should be backwards compatible.
Try installing as in my previous post, and see what happens.
knight2000 likes this post
Reply
#5
To use this older code should fist make virtual environment and clone Repo a use older Python version,then do pip install -r requirements.txt
I did a quick test and this code dos not work anymore,have to do a rewrite of code as there are servals problems.
Code use Selenium and and goes to Google for search,Google has of course changed since 2018.
Also Selenium has changes so need some Path fix,before comes to this error.
From code:
"""
Search on Google and returns the list of PAA questions in SERP.
"""
def newSearch(browser,query):
    if lang== "en":
        browser.get("https://www.google.com?hl=en")
        searchbox = browser.find_element_by_xpath("//input[@aria-label='Search']")
    else:
        browser.get("https://www.google.com?hl=es")
        searchbox = browser.find_element_by_xpath("//input[@aria-label='Buscar']")

    searchbox.send_keys(query) 
Error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@aria-label='Search']"}
Larz60+ and knight2000 like this post
Reply
#6
(Aug-28-2023, 11:09 AM)Larz60+ Wrote: both of those packages should be backwards compatible.
Try installing as in my previous post, and see what happens.

Sorry for the late reply Larz60+,

Thank you for the suggestion. I did give it a go and I managed to get the package working finally but like snippat said, the code itself doesn't seem to work without errors. Thank you for your time in helping me. Much appreciated.
Reply
#7
(Aug-28-2023, 12:12 PM)snippsat Wrote: To use this older code should fist make virtual environment and clone Repo a use older Python version,then do pip install -r requirements.txt
I did a quick test and this code dos not work anymore,have to do a rewrite of code as there are servals problems.
Code use Selenium and and goes to Google for search,Google has of course changed since 2018.
Also Selenium has changes so need some Path fix,before comes to this error.
From code:
"""
Search on Google and returns the list of PAA questions in SERP.
"""
def newSearch(browser,query):
    if lang== "en":
        browser.get("https://www.google.com?hl=en")
        searchbox = browser.find_element_by_xpath("//input[@aria-label='Search']")
    else:
        browser.get("https://www.google.com?hl=es")
        searchbox = browser.find_element_by_xpath("//input[@aria-label='Buscar']")

    searchbox.send_keys(query) 
Error:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@aria-label='Search']"}

Hi Snippat,

Apologies for the late reply. Thank you for taking the time to even try it out yourself and report back that the code has issues. Super helpful as I hadn't got that far! At least now I'm a little more competent in creating a virtual environment with different versions of packages. Very kind of you to even try the code out yourself mate.

Have a great week.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  What are some good books for learning NumPy and Pandas? Pnerd 1 921 Feb-13-2022, 01:14 PM
Last Post: jefsummers
  Help for the shortest way to install a suitable version of Python, Numpy, and OpenCV. Ezzat 2 2,304 Dec-23-2021, 12:34 PM
Last Post: snippsat
  coding problem from older book teddfirth 3 2,151 Mar-06-2021, 03:51 PM
Last Post: teddfirth
  Installing Numpy on Raspberry Pi koepjo 3 20,983 Apr-04-2020, 09:49 AM
Last Post: snippsat
  remove files from folder older than X days kerzol81 2 8,668 Jan-03-2020, 11:55 PM
Last Post: snippsat
  Installing Numpy multiple locations dwhe 4 3,154 Dec-21-2019, 02:02 AM
Last Post: dwhe
  Installing pip and pandas DavidTheGrockle 2 1,681 Oct-24-2019, 10:40 AM
Last Post: DavidTheGrockle
  Problem installing numpy and matplotlib achondrite 1 3,137 Jan-16-2019, 11:43 PM
Last Post: snippsat
  merging lists, dedup and keeping order, in older pythons Skaperen 3 3,177 Oct-19-2018, 01:30 AM
Last Post: ODIS
  Can I upload a new version without previously deleting ancient version sylas 6 4,277 Nov-08-2017, 03:26 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020