• Login
Community
  • Login

PythonScript and system Python

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
15 Posts 3 Posters 1.7k Views
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.
  • E
    Ekopalypse @Michael Vincent
    last edited by Feb 1, 2022, 2:32 PM

    @michael-vincent

    Yes, looks like there is no candy for us :-(

    PythonScript.dll has a dependency on the corresponding python3.x.dlls, so this means either building the 3_0_7 branch with the required changes or upgrading Windows and Python and reinstalling all installed modules.
    Take a look at pip freeze, which can help you save and reinstall the current modules in this case.

    M 1 Reply Last reply Feb 1, 2022, 2:39 PM Reply Quote 2
    • M
      Michael Vincent @Ekopalypse
      last edited by Feb 1, 2022, 2:39 PM

      @ekopalypse said in PythonScript and system Python:

      building the 3_0_7 branch

      Tried that last night and unless I’m not finding it - there are no instructions on what needs to be downloaded (dependencies) and just simply cloning the repo, importing to Visual Studio and “Build” failed miserably for me.

      Cheers.

      E 1 Reply Last reply Feb 1, 2022, 2:44 PM Reply Quote 1
      • E
        Ekopalypse @Michael Vincent
        last edited by Feb 1, 2022, 2:44 PM

        @michael-vincent

        I will try a little later, after work today.
        If I remember correctly there were only two NuGet packages, Python and Boost to install.
        Phew … means I have to install VS again … and I thought this jug had passed me by for good.

        M 2 Replies Last reply Feb 1, 2022, 2:52 PM Reply Quote 0
        • M
          Michael Vincent @Ekopalypse
          last edited by Feb 1, 2022, 2:52 PM

          @ekopalypse said in PythonScript and system Python:

          two NuGet packages

          We’re starting to get at the limits of my VS understanding - most of the time I’m just at a console typing msbuild. Yikes!

          Cheers

          1 Reply Last reply Reply Quote 1
          • M
            Michael Vincent @Ekopalypse
            last edited by Feb 1, 2022, 4:30 PM

            @ekopalypse said in PythonScript and system Python:

            two NuGet packages, Python and Boost

            I did a restore NuGet packages in VS, but I still get error:

            Error	C1083	Cannot open include file: 'pyconfig.h': No such file or directory	PythonScript	C:\Users\vinsworldcom\src\personal\Nppx64Plugins\PythonScript-3.0.7\packages\boost.1.74.0.0\lib\native\include\boost\python\detail\wrap_python.hpp	57	
            

            Cheers.

            E 1 Reply Last reply Feb 1, 2022, 6:18 PM Reply Quote 0
            • E
              Ekopalypse @Michael Vincent
              last edited by Feb 1, 2022, 6:18 PM

              @michael-vincent

              So I installed VS 2019 and cloned PythonScript.
              Installed nuget dependencies and found out that vc142 libs are needed, yes it is VS2019.
              Ok, uninstalled Nuget packages and installed boost 1.78 and boost-regex 1.78 and … there is no boost-python 1.78, only 1.74. grrr :-(
              Uninstalled Nuget packages again, installed version 1.74 and … damn, I can’t retarget the solution to VS 2017 compatible libraries. What the…
              At this point, sorry - I’ll stop.
              Just in case you still have a VS 2017 installation, there is a file called PythonSettings.props in the PythonScript/projects directory.
              Open this in Visual Studio and change it according to your needs.

              Mine would look like this.

                <PropertyGroup Label="UserMacros">
                  <BoostBase>D:\Repositories\npp_plugins\PythonScript\packages\boost_regex-vc141.1.74.0.0</BoostBase>
                  <BoostPythonLibPath>D:\Repositories\npp_plugins\PythonScript\packages\boost_python38-vc141.1.74.0.0\lib\native</BoostPythonLibPath>
                  <PythonBase>D:\ProgramData\Python\Python38_64</PythonBase>
                  <PythonBaseX64>D:\ProgramData\Python\Python38_64</PythonBaseX64>
                  <PythonLibPath>D:\ProgramData\Python\Python38_64\libs</PythonLibPath>
                  <PythonLibPathX64>D:\ProgramData\Python\Python38_64\libs</PythonLibPathX64>
                  <HtmlHelpBase>C:\Program Files (x86)\HTML Help Workshop</HtmlHelpBase>
                </PropertyGroup>
              

              I hope this helps you in building PythonScript.

              M 2 Replies Last reply Feb 1, 2022, 6:29 PM Reply Quote 0
              • M
                Michael Vincent @Ekopalypse
                last edited by Feb 1, 2022, 6:29 PM

                @ekopalypse said in PythonScript and system Python:

                Mine would look like this.

                THANKS!!! That may be what I was missing from mine. Walk away and fingers crossed the developer / maintainer will update PythonScript for us.

                Cheers.

                E 1 Reply Last reply Feb 1, 2022, 6:38 PM Reply Quote 1
                • E
                  Ekopalypse @Michael Vincent
                  last edited by Ekopalypse Feb 1, 2022, 6:39 PM Feb 1, 2022, 6:38 PM

                  @michael-vincent

                  One thing I forgot,
                  I created my own branch git checkout -b py38 and then did a
                  git reset --hard v3.0.8 to get the python3.8 related settings.

                  E 1 Reply Last reply Feb 1, 2022, 6:42 PM Reply Quote 0
                  • E
                    Ekopalypse @Ekopalypse
                    last edited by Feb 1, 2022, 6:42 PM

                    @ekopalypse
                    no, the tag is v3.0.7 for python 3.8.9

                    1 Reply Last reply Reply Quote 0
                    • M
                      Michael Vincent @Ekopalypse
                      last edited by Feb 1, 2022, 9:58 PM

                      @ekopalypse said in PythonScript and system Python:

                      I hope this helps you in building PythonScript.

                      Don’t ask me how - I could never repeat it and with all the warnings and errors (from the other projects in the solution) spewing, I’m not confident at all, … but:

                      PythonScript initialized with C:\usr\bin\npp64\plugins\Config\PythonScript\scripts\startup.py
                      Python 3.8.9 (tags/v3.8.9:a743f81, Apr  2 2021, 11:10:41) [MSC v.1928 64 bit (AMD64)]
                      Initialisation took 735ms
                      Ready.
                      >>> editor.getTextRange(0,5)
                      'hello'
                      

                      My rebuild of the PythonScript 3.0.7-alpha including the new Notepad++ 8.2.2 fix.

                      I’m going to keep using this “test” build to see if it crashes and if so, I’ll assume it’s MY compiling, not the “update” which was just replacing:

                      • ./NppPlugin/include/Scintilla.h
                      • ./NppPlugin/include/Sci_Position.h
                      • ./PythonScript/src/Scintilla.h
                      • ./PythonScript/src/Sci_Position.h

                      with their latest versions from the Notepad++ repo.

                      Cheers.

                      C M 2 Replies Last reply Feb 1, 2022, 11:45 PM Reply Quote 1
                      • C
                        chcg @Michael Vincent
                        last edited by chcg Feb 1, 2022, 11:54 PM Feb 1, 2022, 11:45 PM

                        @michael-vincent

                        Maybe some explanation about the dependencies regarding boost and the python versions used there:

                        1. https://github.com/teeks99/boost-release-windows
                          The official windows builds are created from that repo and just are compiled against one recent python version defined there
                        2. https://github.com/sergey-shandar/getboost
                          , the binaries from 1. are taken and repackaged to nuget.

                        So to be able to use some current boost version also the python version comes in automatically from that repos above.

                        To see how tp configure you local build checkout also the settings used for appveyor builds:
                        https://github.com/bruderstein/PythonScript/blob/master/PythonScript/project/packages_appveyor.config
                        and
                        https://github.com/bruderstein/PythonScript/blob/master/PythonScript/project/PythonSettings_appveyor.props

                        Newer boost versions have the header only regex build so that nuget package is not longer necessary. That was one reason to update. Another one the regex bugfixes.

                        To stay at python 3.8 and have a current boost version it would require to setup an own boost build against that python version. That is nothing I’m willing to work on.

                        I’m working on
                        https://github.com/chcg/PythonScript/tree/scintilla_446
                        to bring the master in line with 8.2.1.

                        And probably in an additional step the adaptation for 8.2.2 for the changed Sci_PositionCR size.

                        Is there any specific reason to stay with WIN7as:
                        Windows 7 support ended on January 14, 2020

                        and the update to win10 is still available for free also no longer officially announced by Microsoft.

                        M 1 Reply Last reply Feb 2, 2022, 12:06 AM Reply Quote 2
                        • M
                          Michael Vincent @chcg
                          last edited by Feb 2, 2022, 12:06 AM

                          @chcg said in PythonScript and system Python:

                          to bring the master in line with 8.2.1.
                          And probably in an additional step the adaptation for 8.2.2 for the changed Sci_PositionCR size.

                          So long as an updated PythonScript with Python 3 is available that address Notepad++ 8.2.2 updates to Sci_Position, I’ll adapt

                          Cheers.

                          1 Reply Last reply Reply Quote 0
                          • M
                            Michael Vincent @Michael Vincent
                            last edited by Feb 2, 2022, 4:44 PM

                            @michael-vincent said in PythonScript and system Python:

                            My rebuild of the PythonScript 3.0.7-alpha including the new Notepad++ 8.2.2 fix.

                            As I re-read this I should note the link is to the actual PythonScript 3.0.7-alpha - NOT my rebuild. I have not posted my rebuild, just done it locally. @chcg above posts how to rebuild PythonScript and indicates the next version may contain the fix:

                            I’m working on
                            https://github.com/chcg/PythonScript/tree/scintilla_446
                            to bring the master in line with 8.2.1.

                            And probably in an additional step the adaptation for 8.2.2 for the changed Sci_PositionCR size.

                            And at some point, I should eventually upgrade to Python 3.10 (from 3.8) and use the latest.

                            Cheers.

                            C 1 Reply Last reply Mar 4, 2022, 7:19 AM Reply Quote 0
                            • C
                              chcg @Michael Vincent
                              last edited by Mar 4, 2022, 7:19 AM

                              @michael-vincent See https://github.com/bruderstein/PythonScript/releases/tag/v3.0.12 and https://github.com/bruderstein/PythonScript/releases/tag/v3.0.11 with the proposed updates

                              1 Reply Last reply Reply Quote 2
                              • First post
                                Last post
                              The Community of users of the Notepad++ text editor.
                              Powered by NodeBB | Contributors