Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    I cannot install pandas 1.2.5

    Support
    4
    10
    540
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      omohyoid last edited by

      I'm using kaggle to test my strategies on the cloud.
      Today an error occurs:
      KeyError: "cannot represent labeled-based slice indexer for coordinate 'time' with a slice over integer positions; the index is unsorted or non-unique"
      螢幕擷取畫面 2024-06-18 001539.png 螢幕擷取畫面 2024-06-18 001518.png
      Then I check the installation of the packages. I found that pandas 1.2.5 was not successfully installed, which cause the error.
      螢幕擷取畫面 2024-06-18 001720.png
      螢幕擷取畫面 2024-06-18 001752.png
      The error results from the wrong version of pandas, but I cannot install pandas 1.2.5, so I cannot fix the error.
      Does anyone know how to install pandas 1.2.5 on kaggle?
      I may need some help from @support
      Thx very much

      illustrious.felice support 2 Replies Last reply Reply Quote 1
      • D
        durasm last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • illustrious.felice
          illustrious.felice @omohyoid last edited by

          @omohyoid Hi, you can switch to google colab

          O 2 Replies Last reply Reply Quote 0
          • support
            support @omohyoid last edited by

            @omohyoid Hi,

            We recently upgraded our library to use Python v3.10, but it still requires Pandas v1.2.5 to function properly. To avoid dependency issues, we recommend using Conda to create an environment and then installing Pandas v1.2.5 with pip. Here’s the approach:

            1. Use Conda to set up the environment.
            2. As the final step, install Pandas 1.2.5 using the command pip install 'pandas==1.2.5'.

            This method installs everything without errors and ensures compatibility. Until we update the qnt library to support a newer version of Pandas, you can use this strategy to set up your environment.

            If you encounter any issues or have further questions, feel free to reach out.

            O 1 Reply Last reply Reply Quote 0
            • O
              omohyoid @support last edited by

              @support 螢幕擷取畫面 2024-06-20 010314.png
              Do you mean I need to run the commands like this?

              1 Reply Last reply Reply Quote 0
              • O
                omohyoid @illustrious.felice last edited by

                @illustrious-felice Thanks for ur suggestion, I'll try it

                1 Reply Last reply Reply Quote 0
                • O
                  omohyoid @illustrious.felice last edited by

                  @illustrious-felice It still fails to install pandas 1.2.5 in GCP
                  螢幕擷取畫面 2024-06-20 111334.png

                  support 2 Replies Last reply Reply Quote 0
                  • support
                    support @omohyoid last edited by

                    @omohyoid Apparently it can't find dependencies to build Pandas. In a clean container you may not have gcc and g++ packages installed.

                    Try to do apt-get install --yes gcc g++ before installing Pandas.

                    1 Reply Last reply Reply Quote 0
                    • support
                      support @omohyoid last edited by support

                      @omohyoid I did some tests and yes, there is a problem. Unfortunately, updating pandas is not as trivial task as one could think and we are working on it. For now, the problem can be solved by downgrading cython package before trying to install pandas. Here is how to do it properly:

                      !apt-get update && apt-get install -y gcc g++ 
                      !pip install --no-cache-dir 'cython==0.29.37' 
                      !pip install --no-cache-dir --no-build-isolation 'pandas==1.2.5'
                      
                      O 1 Reply Last reply Reply Quote 0
                      • O
                        omohyoid @support last edited by

                        @support Thx for ur reply
                        I'll try it

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB | Contributors
                        • Documentation
                        • About
                        • Career
                        • My account
                        • Privacy policy
                        • Terms and Conditions
                        • Cookies policy
                        Home
                        Copyright © 2014 - 2021 Quantiacs LLC.
                        Powered by NodeBB | Contributors