Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: Help installing PySAL on win10...

  1. #1
    Ask me about my bottom br FaultyMario's Avatar
    Join Date
    Jan 2014
    Location
    ox.mx
    Posts
    8,312

    Help installing PySAL on win10...

    I had dm'd TomServo with a question that i had. Tom, please ignore that DM as it seems that i can run cURL.

    So I have Qgis installed and I need to import the PySAL packages.

    However it seems the PySAL developers recommend using Conda over Python.

    Which seems a little crazy considering that Qgis has a built-in interpreter for installing external Python packages, but not a Conda one.

    So far, I've been unable to accomplish this: https://anitagraser.com/2014/07/13/i...l-for-osgeo4w/

    So I'm wondering if I should try to do this instead. Any thoughts?

    I'm just completely clueless about all these languages. But the guy answering is working on Linux, not Win.

    There's also this suggestion from a dude working on a Windows environment.

    On Windows there is a third possibility to install Pysal (not really suggeted but usually it works). It is described in the installation instruction within the readme file.

    Basically, you have to open this folder:

    C:\PROGRA1\QGIS21.18\apps\Python27\lib\site-packages

    Remove (if exist) any folder of Pysal.

    Download and decompress the folder you can download from here:
    Please, help. I'm going crazy.
    Last edited by FaultyMario; April 30th, 2024 at 09:20 AM.
    acket.

  2. #2
    Ask me about my bottom br FaultyMario's Avatar
    Join Date
    Jan 2014
    Location
    ox.mx
    Posts
    8,312
    I think the guy from the last link is correct. Maybe my OSGeoW and QGis paths are different and that's why installing something thru the OSGeoW shell doesn't show up in the Python terminal within QGis.

    How could I check that?
    acket.

  3. #3
    Administrator
    Join Date
    Jan 2014
    Posts
    8,904
    Just to make your life easier, any chance you can do all this on WSL? I'm giving it a quick shot to see if I can get it functioning in an Ubuntu install running in WSL2 on my Windows 11 box.

    Conda appears to just be a different distro of Python that's specifically made to make things "easier". The definition of "easier", of course, is up for debate. I'm completely unfamiliar with conda and had not heard of it until now.

    I was able to get pysal installed on windows but then ran into issues actually getting a python script to play nice with it. I was able to get it to work just fine on Ubuntu on WSL though.

    Quote Originally Posted by My computer
    swervo@DESKTOP-M700UUR:~$ sudo apt-get install -y python3 python3-pip
    swervo@DESKTOP-M700UUR:~$ pip3 install pysal

    swervo@DESKTOP-M700UUR:~$ python3
    Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pysal
    >>>

  4. #4
    Administrator
    Join Date
    Jan 2014
    Posts
    8,904
    Also, I have python3 installed on my windows box and was able to make that work as well from the standard command line. Same thing, "pip3 install pysal" and run it under "python3".

    If you are running into situations where sometimes site-packages are causing issues, you might want to look into pyenv to isolate different apps to their own sets of libraries. Aside, the fact that things like pyenv have to exist is part of the reason I never want to work with Python again.

  5. #5
    Administrator
    Join Date
    Jan 2014
    Posts
    8,904
    Oooh, I wonder if that's part of the problem:

    Quote Originally Posted by Pysal's page
    As of version 2.0.0 PySAL has shifted to Python 3 only.
    The quote you showed is running Python 2.7, not sure if that's where you're also getting stuck?

  6. #6
    Administrator
    Join Date
    Jan 2014
    Posts
    8,904
    And in all of this, I think I overlooked that this is a problem getting Qgis to play nice. Okay, giving that a shot.

  7. #7
    Administrator
    Join Date
    Jan 2014
    Posts
    8,904
    Okay, I've got QGIS installed. I have no idea how to tell if it's recognizing my pysal installation or not - how would I verify that? I have no idea what I'm doing with this tool.

  8. #8
    Ask me about my bottom br FaultyMario's Avatar
    Join Date
    Jan 2014
    Location
    ox.mx
    Posts
    8,312
    ctrl + alt + p

    opens the python terminal within qgis.

    once there, check if you can import the numpy, scipy and pysal packages. the three are interdependent but only the first two come as default installs.
    acket.

  9. #9
    Ask me about my bottom br FaultyMario's Avatar
    Join Date
    Jan 2014
    Location
    ox.mx
    Posts
    8,312
    i am running python 3.9 and i was able to paste the tar file with pysal 1.14 to the scripts folder, but it didn't seem to do anything.
    acket.

  10. #10
    Ask me about my bottom br FaultyMario's Avatar
    Join Date
    Jan 2014
    Location
    ox.mx
    Posts
    8,312
    yes it's basically getting 3 "apps" to play nice with each other. Or rather just 2, qgis and python; osgeow is just there to thirdwheel; but as with all thirdwheelers, it's just a nuisance.
    acket.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •