|
lol PyCharm won't even let me create a virtual environment for 2.6 because it's so old
fuf fucked around with this message at 12:30 on Mar 4, 2020 |
# ? Mar 4, 2020 12:28 |
|
|
# ? May 14, 2024 18:34 |
I forgot about epel. There's also ius repo which has a lot of py3 builds for CentOS
|
|
# ? Mar 4, 2020 12:30 |
|
Wait, how'd you get PyCharm installed? e: Oh probably on a separate development machine, nevermind
|
# ? Mar 4, 2020 12:30 |
|
QuarkJets posted:Wait, how'd you get PyCharm installed? yeah so far I'm just having fun testing all this stuff on my local machine I've still gotta convince the powers that be to install the pysftp package on the TEST server (let alone the LIVE server) before I can test it properly
|
# ? Mar 4, 2020 12:41 |
fuf posted:yeah so far I'm just having fun testing all this stuff on my local machine I work both sides of the dev/sysad fence and there's no excuse for it to be this difficult for you
|
|
# ? Mar 4, 2020 13:10 |
|
Bundy posted:I work both sides of the dev/sysad fence and there's no excuse for it to be this difficult for you It can be frustrating but I'm getting used to it. It's a big public institution (a university) so they are just very risk averse, with a lot of well-intentioned but only half-implemented "change management" procedures. I'm confident I'll get the things I need eventually, it's just a slow process!
|
# ? Mar 4, 2020 13:20 |
|
fuf posted:I'm confident I'll get the things I need eventually, it's just a slow process!
|
# ? Mar 4, 2020 14:40 |
|
I also work for a university. We update to Debian new stable version at the .1 release. Your software runs on Debian stable. If it doesn't, well, you better work on getting that fixed because once oldstable runs out the VM gets killed. It's actually pretty nice. We have a very clear two year upgrade rhythm. It's always a little behind the state of the art, but not that far. Sometimes a bit of Django stuff needs updating but it's all easy to manage. It is my experience that orgs that fall behind too much never manage the jump to the present ever again. Once you are too far behind the accumulated mass of changes becomes too much for an upgrade and people give up.
|
# ? Mar 4, 2020 16:37 |
Antigravitas posted:It is my experience that orgs that fall behind too much never manage the jump to the present ever again. Once you are too far behind the accumulated mass of changes becomes too much for an upgrade and people give up. Same and it ultimately defeats the whole "stability through precaution" approach as any software you're running ends up stuck with any security holes it's got. For example a place I am familiar with is currently still stuck running on PHP 5.5 due to poor planning/not moving off CentOS6 and little will to upgrade previously and are finding it very painful as needing to be secure and compliant is eroding at that "it's too hard" excuse. It's 2020, even if you're still colo-ing there's enough tools available to make at least following CentOS/Debian Stable/Ubuntu LTS largely trivial.
|
|
# ? Mar 4, 2020 17:52 |
|
I feel like I need to unsubscribe from this thread until the talk about using Python 2.6 passes or else my corporate IT web monitor will detect posts about using it and keep us on Python 2 forever.
|
# ? Mar 4, 2020 18:37 |
|
Package your python 3.8 scripts with PyInstaller or the like and then run them on whatever system you like!
|
# ? Mar 4, 2020 19:06 |
|
Of course, using debootstrap to create a Debian Buster installation and shipping it whole is the real pro move. No need for container orchestration, just chroot!
|
# ? Mar 4, 2020 19:31 |
|
Thermopyle posted:Package your python 3.8 scripts with PyInstaller or the like and then run them on whatever system you like! Expecting a specific Py version/dep setup's awk, even though it's common, or sometimes mitigated by venvs.
|
# ? Mar 4, 2020 19:51 |
*looks wistfully at Go binary distribution*
|
|
# ? Mar 4, 2020 19:52 |
|
I hate when I'm trying to install software, and it turns out to be unwrapped Python. Often doesn't work or is a pain to get working. Dudes who are struggling with old Py versions at work: What's the stumbling block? (eg: Your code for a work proj has to work with a larger old Py codebase? Your work won't let you install anything? Installing a normal system-install of Py3.8 would conflict with a diff install?) Has anyone here tried Nuitka or PyOxidizer? They're supposed to help with packaging Python code as executables. Dominoes fucked around with this message at 01:35 on Mar 5, 2020 |
# ? Mar 4, 2020 21:58 |
|
Dominoes posted:I hate when I'm trying to install software, and it turns out to be unwrapped Python. Often doesn't work or is a pain to get working. 9/10 times it's going to be a culture that's using configuration management as an excuse to delay OS upgrades. That's what keeps my org still running RHEL 6 systems long after other groups in the same org have moved onto 7 and 8. So since configuration is the concern you're likely stuck with whatever versions of Python are available in the now very old but still official OS repos
|
# ? Mar 5, 2020 06:07 |
|
Is Py 3.8 incompatible with RH6? Ie why can't you install it or load a standalone portable Py? What about loading binaries that include the code and interpreter? Maybe-related issue where a dude could only use the pypi Version of a py proj manager since he wasn't allowed to load the rpm. (The pypi v was built for newer Linux so didn't work) Evidently even binaries can have dep issues with older linux distros, but it's easy enough to compile on Centos in addition to new Oss Dominoes fucked around with this message at 15:17 on Mar 5, 2020 |
# ? Mar 5, 2020 15:08 |
|
I don't know about installing a package to get such a new interpreter. I have built from source on some pretty old OSes and been fine. The hard part was getting some of the auxiliary stuff to get included like readline. Installing it into a system path comes at the risk of blowing up distribution-specific Python scripts. If the machine is otherwise strictly secured despite running ancient, exploitable software, the build may need permissions to do what you want. I have not had good luck with that politically.
|
# ? Mar 5, 2020 17:38 |
|
I was only partly kidding about using PyInstaller or equivalent. I've done that several times for distributing a script to systems on a network because of overly-cautious system administrators. Conda and pyenv are both potential solutions as well since they just install in the user directory and might not require compiling something with build tools not available on the target distro.
|
# ? Mar 5, 2020 17:59 |
|
I can't remember what it is, but there's a flag you can pass to the compiler that lets you build CPython into its own folder; as you implied, the default settings will try to install it to the system. Overall it's a 2 or 3 liner to build, using the source code from the Python website. Might be worth trying.
|
# ? Mar 5, 2020 18:00 |
|
code:
I don't think the -j4 flag really helped any on that old of an OS and machine, but it's habit. The build tools were the ones from the OS package and were also old like everything else. Thermopyle posted:I was only partly kidding about using PyInstaller or equivalent. I've done that several times for distributing a script to systems on a network because of overly-cautious system administrators. Nobody's acknowledging Thermopyle, but this is fine advice.
|
# ? Mar 5, 2020 18:24 |
|
Awesome
|
# ? Mar 5, 2020 18:46 |
|
Dominoes posted:Is Py 3.8 incompatible with RH6? Ie why can't you install it or load a standalone portable Py? You can, and that was the advice initially given (e.g. Use Anaconda), but OP was concerned about "rocking the boat". I take that as meaning that it's an issue with IT policies; OP can bring in scripts that run with an official centos6 interpreter but probably can't provide new binaries
|
# ? Mar 5, 2020 22:01 |
|
Shower thought: You can wrap arbitrary executables in Python wheels. Ie make an empty package, and put the executable in the wheel file under data/scripts, and some metadata in dist-info. You can then put this on Pypi, and users can install it with pip, then have it available from the CLI etc. I'd bet you could put a whole Python install inside a wheel. Pythonception. And it could be installed on your geriatric locked-down enterprise Linux. edit: The naive approach isn't working. I think the inner python's having trouble finding its libraries. Dominoes fucked around with this message at 20:45 on Mar 6, 2020 |
# ? Mar 6, 2020 16:56 |
|
Dominoes posted:Shower thought: You can wrap arbitrary executables in Python wheels. Ie make an empty package, and put the executable in the wheel file under data/scripts, and some metadata in dist-info. You can then put this on Pypi, and users can install it with pip, then have it available from the CLI etc. I think the interpreter they're talking doesn't even know what pip is, or if it does, it doesn't know what wheels are, and installing wheel is an IT party foul. Actually, I think I had a case where pip was too old to install wheel. I haven't had to deal with an environment like that being locked down by IT, but rather clones of test OSes where I had to be able to easily share the process. Building from source would not have been considered an easy thing in the situation. Running get-pip was even too much.
|
# ? Mar 7, 2020 02:21 |
|
Ick. I was able to run arbitrary code at work by making a webapp. To make things better, I got computers funded by a side-channel, and they run on non-official wifi we have. So comm has no control and the computers run fast since there's no beurocratic shitware slowing them down. I don't think comm would even care since neither the comps nor server touch their network.
|
# ? Mar 7, 2020 21:02 |
|
I'm convinced the most common way we use technology is to try to solve political problems.
|
# ? Mar 7, 2020 21:48 |
|
Thermopyle posted:Package your python 3.8 scripts with PyInstaller or the like and then run them on whatever system you like! PyInstaller gets nuked as a virus by most antivirus softwares.
|
# ? Mar 9, 2020 15:21 |
|
CarForumPoster posted:PyInstaller gets nuked as a virus by most antivirus softwares. I've found this to be very inconsistent.
|
# ? Mar 9, 2020 16:06 |
|
Newbie question: I'm currently getting the following error: quote:NameError: name 'df' is not defined code:
StackOverflow generally emphasized including 'return' but it doesnt seem to help. Other posts suggested placing this in a class but no luck for me either. Appreciate any suggestions!
|
# ? Mar 10, 2020 19:14 |
|
Tortilla Maker posted:Newbie question: Is that the entirety of the code? What line is the actual error on.
|
# ? Mar 10, 2020 19:29 |
|
That code works for me:code:
|
# ? Mar 10, 2020 19:31 |
|
Tortilla Maker posted:Newbie question: The fact that you talk about optionally including 'return' makes me think that particular line is not getting parsed as being part of generate_df and it's just floating out in the naked void. The paste looks fine but the original file might be different. What editor are you using for this? You might want to paste the code in from the post and try again since it looks like the paste has normalized the spaces.
|
# ? Mar 10, 2020 19:39 |
|
Thank you all for the quick replies. And apologies for the poor explanation. Issue is that I was attempting to call the dataframe elsewhere in my code. For now, I can reference it by using "df = generate_df()" but I was hoping to just use the dataframe as it was defined inside the function (in this example, df). Writing this on my phone and while on the go, so apologies for the poor example!
|
# ? Mar 10, 2020 20:06 |
|
Yeah, you need to assign the output of the function to a variable you then use later in the code.
|
# ? Mar 10, 2020 20:27 |
|
Just as aside that function is pretty meaningless unless you are planning on doing additional processing to the dataframe before using itcode:
code:
code:
lazerwolf fucked around with this message at 20:39 on Mar 10, 2020 |
# ? Mar 10, 2020 20:35 |
|
Tortilla Maker posted:Thank you all for the quick replies. And apologies for the poor explanation. What you're confused about is called scope, looking that up and reading about it might help understand why you can't use "df" outside of the function you're defining it in.
|
# ? Mar 10, 2020 20:36 |
|
I'm so lost. I've got a file uploader in Flask that's intermittently uploading the file. I can't tell if this is one bug or multiple. I've got a form: code:
code:
code:
code:
Further super weird behavior - I have an image in a directory and I can upload it just fine. However if I copy and paste it then try to upload the pasted image, it doesn't work.
|
# ? Mar 10, 2020 22:28 |
|
huhu posted:
Is image None?
|
# ? Mar 10, 2020 22:47 |
|
|
# ? May 14, 2024 18:34 |
|
Edit: I'm doing a bunch of dumb crap. Taking a break. Carrry on.
huhu fucked around with this message at 23:15 on Mar 10, 2020 |
# ? Mar 10, 2020 22:58 |