Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Python 3 in pfsense

    Scheduled Pinned Locked Moved pfSense Packages
    28 Posts 9 Posters 12.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.
    • C
      CouldntMakeUpOne
      last edited by

      Hey, installed pfsense version 2.4.4. Is there a way to install python 3 in it so that I can run a script? I saw from pkg info that 2.7 is in it, do I have to unpack it? I would much prefer python 3 though.

      1 Reply Last reply Reply Quote 0
      • BBcan177B
        BBcan177 Moderator
        last edited by

        https://redmine.pfsense.org/issues/9360

        "Experience is something you don't get until just after you need it."

        Website: http://pfBlockerNG.com
        Twitter: @BBcan177  #pfBlockerNG
        Reddit: https://www.reddit.com/r/pfBlockerNG/new/

        1 Reply Last reply Reply Quote 0
        • C
          CouldntMakeUpOne
          last edited by

          Reading that, am I right to assume that python3 will only be implemented by 2020?
          Is there any way I can go about running a python3 script now?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            We will have pfSense 2.5.0 snapshots available soon with Python 3.6, which you can use for testing then. No ETA, but very soon. We have only a few minor blockers to solve internally before they are ready for public testing.

            [2.5.0-DEVELOPMENT][root@jack]/root: pkg info -x python
            python36-3.6.7
            [2.5.0-DEVELOPMENT][root@jack]/root: python3.6 --version
            Python 3.6.7
            

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • C
              CouldntMakeUpOne
              last edited by

              Oh, that's great.
              Few questions though, sorry fairly new to the forum.
              1)Will it be within the month?
              2)Is there any way I can sign up to receive a notification when it is released?
              3)Will it be available to download like all the versions via https://www.pfsense.org/download/ ?

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                1. The snapshots should be available soon, but we can't given an ETA. I'd expect them well before the end of the month, but no guarantees. The release will not be for some time yet after that, a few months, most likely.

                2. I'm not sure where we will announce them, probably here on the forum and reddit at least. There might be a blog post, but probably not an announcement e-mail. It will probably be hard to miss when it happens.

                3. Not from that URL, since it won't be a release for quite some time. Development snapshots are on https://snapshots.pfsense.org/

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • Kalle13K
                  Kalle13
                  last edited by

                  You can install python 3 from the from the official ports of FreeBSD 11. I did it several days ago.
                  For the installation you need the http path of the repo to install it. It is because pfsense has not all repos but only a tiny bit.

                  Kalle

                  "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

                  • Kinderzimmer Productions
                  C 1 Reply Last reply Reply Quote 0
                  • C
                    CouldntMakeUpOne @Kalle13
                    last edited by

                    @kalle13 Sorry, what do you mean the http path of the repo. Any guide I can follow. I'm fairly new to this.

                    1 Reply Last reply Reply Quote 0
                    • Kalle13K
                      Kalle13
                      last edited by

                      Read this for installation:

                      https://docs.netgate.com/pfsense/en/latest/packages/installing-freebsd-packages.html

                      and use these repos:
                      http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/

                      "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

                      • Kinderzimmer Productions
                      GrimsonG 1 Reply Last reply Reply Quote 0
                      • GrimsonG
                        Grimson Banned @Kalle13
                        last edited by

                        @kalle13 said in Python 3 in pfsense:

                        and use these repos:
                        http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/

                        Just don't come crying when the next pfSense update fails.

                        Kalle13K 1 Reply Last reply Reply Quote 0
                        • Kalle13K
                          Kalle13 @Grimson
                          last edited by

                          @grimson Really? I did not know that. Is this for sure when I am installing other repos?

                          "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

                          • Kinderzimmer Productions
                          GrimsonG 1 Reply Last reply Reply Quote 0
                          • GrimsonG
                            Grimson Banned @Kalle13
                            last edited by

                            @kalle13 said in Python 3 in pfsense:

                            @grimson Really? I did not know that. Is this for sure when I am installing other repos?

                            It has happened in the past already.

                            Kalle13K 1 Reply Last reply Reply Quote 0
                            • jimpJ
                              jimp Rebel Alliance Developer Netgate
                              last edited by

                              He's right. Do not be surprised when that causes problems. Do not do that on a production system you care about.

                              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                              Need help fast? Netgate Global Support!

                              Do not Chat/PM for help!

                              1 Reply Last reply Reply Quote 0
                              • GertjanG
                                Gertjan
                                last edited by

                                On the other hand : if one is comfortable with installing from the standard FreeBSD repository, upgrading by re installing "from scratch" will be no issue at all.

                                No "help me" PM's please. Use the forum, the community will thank you.
                                Edit : and where are the logs ??

                                1 Reply Last reply Reply Quote 0
                                • Kalle13K
                                  Kalle13 @Grimson
                                  last edited by

                                  @grimson Ok, thanks for your advice. I keep that in mind when the next upodate arrives. What can I do if the update fails?

                                  "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

                                  • Kinderzimmer Productions
                                  KOMK 1 Reply Last reply Reply Quote 0
                                  • KOMK
                                    KOM @Kalle13
                                    last edited by

                                    @kalle13 Reinstall fresh, restore your xml config and then re-add the Python3 package. Plus, the update may not fail, but it may blow away your Python3 package and cause the things you need it for to break.

                                    Kalle13K 1 Reply Last reply Reply Quote 0
                                    • Kalle13K
                                      Kalle13 @KOM
                                      last edited by

                                      @kom Thanks for your advice!

                                      "Jeder kocht mit Wasser, man kann das Binsenweisheit nenn`. Der unterschied zu dir ist, dass wir zwei kochen könn`"

                                      • Kinderzimmer Productions
                                      1 Reply Last reply Reply Quote 0
                                      • C
                                        CouldntMakeUpOne
                                        last edited by

                                        Hi everyone, sorry for being this thread up again but what about python 2 in the meantime? I saw that there is already python 2 inside pfsense using "pkg info" but I am not able to run python commands. Do I need to do some sort of extraction?

                                        jimpJ 1 Reply Last reply Reply Quote 0
                                        • jimpJ
                                          jimp Rebel Alliance Developer Netgate @CouldntMakeUpOne
                                          last edited by

                                          @couldntmakeupone said in Python 3 in pfsense:

                                          Hi everyone, sorry for being this thread up again but what about python 2 in the meantime? I saw that there is already python 2 inside pfsense using "pkg info" but I am not able to run python commands. Do I need to do some sort of extraction?

                                          Python 2.7 is there and works fine, it just isn't in the python command, but python2.7. If you must have it available when typing python then make an alias or symlink.

                                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                          Need help fast? Netgate Global Support!

                                          Do not Chat/PM for help!

                                          1 Reply Last reply Reply Quote 0
                                          • C
                                            CouldntMakeUpOne
                                            last edited by

                                            @jimp said in Python 3 in pfsense:

                                            symlink.

                                            So, can I just run python 2.7 programs in pfsense by using ./python.py?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.