|
Dominoes posted:Native; non virtual. I guess I just barely use conda. Wasn't really aware there was such a thing as a non virtual anaconda interpreter! Really though, with how inexpensive and fast it is, I wouldn't really recommend most people ever use a non-virtual interpreter. Though, I admit, there might be use cases I'm not thinking of. Thermopyle fucked around with this message at 00:04 on Nov 5, 2015 |
# ? Nov 5, 2015 00:01 |
|
|
# ? May 9, 2024 18:18 |
|
I don't really use python that much, but my setup is Windows with PyCharm, and a bunch of venvs (not because I really need separate environments, just as a best practice thing). Working with the venvs feels like a pain, especially in a console - a lot of the time I prefer opening the whole IDE just to run a script. Last time I did a thing, I spent hours wrestling with the packaging system and ended up having to (I think) download a particular wheel and rename it to trick the system into installing it Anyway, am I an idiot for not using Anaconda? I don't really know a lot about it but it seems like y'all are using it, and if it removes any of the headaches I'm in
|
# ? Nov 5, 2015 11:00 |
|
baka kaba posted:Anyway, am I an idiot for not using Anaconda?
|
# ? Nov 5, 2015 11:05 |
|
baka kaba posted:I don't really use python that much, but my setup is Windows with PyCharm, and a bunch of venvs (not because I really need separate environments, just as a best practice thing). Working with the venvs feels like a pain, especially in a console - a lot of the time I prefer opening the whole IDE just to run a script. Last time I did a thing, I spent hours wrestling with the packaging system and ended up having to (I think) download a particular wheel and rename it to trick the system into installing it No, you're not an idiot. I switched from virtualenvs to anaconda because everyone in here is always talking about it, but for the use case of virtual environments, I don't really find it any better than virtualenv. There's a caveat to that though. When you install packages that require compiling on Windows you're often in for a world of hurt. Anaconda provides pre-compiled packages automatically. Whether or not you require compiled packages depends a lot on what field you're working in. It's certainly possible to never need them and thus never run into Anaconda's best feature when it comes to virtual environments. As far as the extra work of using virtualenvs...look into using virtualenvwrapper. It makes it easier. I think there's a branch for windows.
|
# ? Nov 5, 2015 15:54 |
|
Thermopyle posted:As far as the extra work of using virtualenvs...look into using virtualenvwrapper. It makes it easier. I think there's a branch for windows. It's a bitch and a half to install it on windows, but it's well worth it. http://www.tylerbutler.com/2012/05/how-to-install-python-pip-and-virtualenv-on-windows-with-powershell/
|
# ? Nov 5, 2015 16:14 |
|
baka kaba posted:I don't really use python that much, but my setup is Windows with PyCharm, and a bunch of venvs (not because I really need separate environments, just as a best practice thing). Working with the venvs feels like a pain, especially in a console - a lot of the time I prefer opening the whole IDE just to run a script. Last time I did a thing, I spent hours wrestling with the packaging system and ended up having to (I think) download a particular wheel and rename it to trick the system into installing it Well, if you're having issues activating the environment, it won't help. I'm confused what you mean, though. In the console it's one line; in PyCharm you set it and forget it. (is there a shebang equivalent on Windows so you can hard-code the environment into the script?) OTOH if you're having issues installing packages into the environments, Anaconda may solve these issues.
|
# ? Nov 5, 2015 17:16 |
|
Dominoes posted:Native; non virtual. Those words don't make any sense in this context.
|
# ? Nov 5, 2015 18:35 |
|
Lysidas posted:Those words don't make any sense in this context. I was able to deduce what he meant. Apparently setting Anaconda as your system python interpreter and not using environments is a thing that people do.
|
# ? Nov 5, 2015 18:54 |
|
That doesn't make any sense, though. Support of Python 3.5 syntax and features is independent of whether the Python interpreter is the "main" Python installation or a virtualenv. "Full Python 3.5 support" probably means things like the new async syntax; PyCharm 4.5.4 supported the @ matrix multiplication operator but doesn't understand things like async def function(): ...
|
# ? Nov 5, 2015 19:11 |
|
Lysidas posted:That doesn't make any sense, though. Support of Python 3.5 syntax and features is independent of whether the Python interpreter is the "main" Python installation or a virtualenv. "Full Python 3.5 support" probably means things like the new async syntax; PyCharm 4.5.4 supported the @ matrix multiplication operator but doesn't understand things like async def function(): ... We're talking about Anaconda not PyCharm.
|
# ? Nov 5, 2015 19:26 |
|
Thermopyle posted:We're talking about Anaconda not PyCharm. There's the confusion... the conversation started about PyCharm (check the last page).
|
# ? Nov 5, 2015 19:44 |
|
Cingulate posted:Idiot is a strong word, but ... you are not. but if you are using windows, then having your packages precompiled is helpful. due to how buggy pip is on windows it can be a nightmare to build a package compared to linux. if you are using windows then anaconda should be a strong possibility if working with many external packages.
|
# ? Nov 5, 2015 20:41 |
|
For the record "Python 3.5 support" for Anaconda just means that now there are installers (either full Anaconda or Miniconda network installer) that make Python 3.5 the default python interpreter in the root environment. As noted, anyone could create a new named Python 3.5 environment for some time now.
|
# ? Nov 5, 2015 23:20 |
|
Nitrocat posted:you are not. but if you are using windows, then having your packages precompiled is helpful. due to how buggy pip is on windows it can be a nightmare to build a package compared to linux. if you are using windows then anaconda should be a strong possibility if working with many external packages. Pip for Windows has improved immeasurably in the past few versions. There are still some packages that really do need to be compiled from source (numpy, liblas, greenlet, pyxml) but for the most part pip knows how to work with whl files and knows when to try to compile and when not to.
|
# ? Nov 6, 2015 01:28 |
|
I am trying to figure out how best to accomplish the following: I have a small simulation written in Python that I now want to make more user friendly so that people can actually use it. In particular, I would like people to be able to 1. Change the simulation parameters before clicking a button and running the simulation, 2. See the progress of the simulation (which is currently just text output to the console), and 3. See plots associated with the simulation once it is done running. Thus I need some sort of GUI. My idea was to use a web browser to accomplish all of this. Is something like this even possible? If so, what should I begin reading up on /searching for to be able to accomplish this?
|
# ? Nov 6, 2015 15:26 |
|
Jose Cuervo posted:I am trying to figure out how best to accomplish the following: You could use Electron (though I'm not sure it would be the ideal solution). You could also look at using Kivy (or GTK/QT/etc).
|
# ? Nov 6, 2015 15:35 |
|
SurgicalOntologist posted:Well, if you're having issues activating the environment, it won't help. I'm confused what you mean, though. In the console it's one line; in PyCharm you set it and forget it. (is there a shebang equivalent on Windows so you can hard-code the environment into the script?) I was more wondering if there was a way to streamline it really, so it's not "navigate to the relevant venv's scripts folder, activate it, navigate to the project folder, run the script", especially if you just want to bang it out as a quick command. It's fine within PyCharm obviously! Thermopyle posted:No, you're not an idiot. I switched from virtualenvs to anaconda because everyone in here is always talking about it, but for the use case of virtual environments, I don't really find it any better than virtualenv. I'll check out that wrapper, it looks a little better at least. And yeah my biggest headache was installing... lxml I think, I ended up researching the whole package management system and chasing down various binary versions and having to try faking the filename so it would install on my system... it was just a dependency for something else, I just wanted to import it and get on with what I was doing. So yeah, any extra layer of management convenience would be great I guess what I'm really asking is, is Anaconda like a 'default' Python distribution at this point? What the average person should be installing so they can get coding with a minimum of fuss and hassle?
|
# ? Nov 6, 2015 15:41 |
|
baka kaba posted:I was more wondering if there was a way to streamline it really, so it's not "navigate to the relevant venv's scripts folder, activate it, navigate to the project folder, run the script", especially if you just want to bang it out as a quick command. It's fine within PyCharm obviously! Oh yeah I haven't used venv for so long I forgot you had to navigate to its folder. Yeah, use conda. It makes the activation process just activate <name-of-env> in Windows (no need to be in any special directory). And conda install lxml will get the binaries and dependencies.
|
# ? Nov 6, 2015 16:40 |
|
SurgicalOntologist posted:Oh yeah I haven't used venv for so long I forgot you had to navigate to its folder. Yeah, use conda. It makes the activation process just activate <name-of-env> in Windows (no need to be in any special directory). And conda install lxml will get the binaries and dependencies. Well, virtualenvwrapper fixes that. baka kaba posted:I guess what I'm really asking is, is Anaconda like a 'default' Python distribution at this point? What the average person should be installing so they can get coding with a minimum of fuss and hassle? I can't really think of any downsides to just using Anaconda. I actually use miniconda. AFAICT, the only difference between Anaconda and miniconda is that Anaconda includes a bunch of packages in the download, whereas with miniconda, it downloads packages when you install them. I don't think I'd call Anaconda the 'default' in the python community.
|
# ? Nov 6, 2015 17:15 |
|
Yeah it's more the management stuff that sounds nice, I don't actually need all the packages - I mean being able to just make a library appear on your system when you need it is why package managers are neat! And I know Anaconda isn't the only one of these, I guess I was more asking if these systems are the 'default' over a straight Python download. Like how using some sort of IDE is the 'default' way to program as far as recommendations go, rather than just coding in notepad. That's probably not the best analogy but you know what I mean
|
# ? Nov 6, 2015 18:56 |
|
Thermopyle posted:Well, virtualenvwrapper fixes that. Yeah, and I actually use pew (with miniconda) but I didn't want to complicate things further. Anaconda (well, miniconda) is my default recommendation, and it may be some kind of "default" within the scientific Python community but not so much for Python users as a whole. It should be, though.
|
# ? Nov 6, 2015 19:10 |
|
I thought pip was the "default" package manager/installer.
|
# ? Nov 6, 2015 19:17 |
|
"Default" is the wrong word here, I think baka kaba meant more along the lines of "most recommended". It is (in my opinion) "what the average person should install to get coding with minimal fuss."
|
# ? Nov 6, 2015 19:41 |
|
PyCharm question: If I have to go an arbitrary line (say, to fix an error) how can I quickly find out which class I'm in? Is there some way to make the view of my project expand/collapse to follow where I am in the code?
|
# ? Nov 6, 2015 21:09 |
|
Yeah I really meant it in the "use this, idiot!" sense hence the FoiledAgain posted:PyCharm question: If you click the settings gear on that pane and you have an Autoscroll from Source option, it's that
|
# ? Nov 6, 2015 22:13 |
|
baka kaba posted:Yeah I really meant it in the "use this, idiot!" sense hence the Thanks! I never noticed that option before.
|
# ? Nov 6, 2015 23:21 |
|
SurgicalOntologist posted:"Default" is the wrong word here, I think baka kaba meant more along the lines of "most recommended". It is (in my opinion) "what the average person should install to get coding with minimal fuss." Ah, sure, that makes sense. As far as I can recall, except for installing lxml (), I've yet to have a really bad experience using pip.
|
# ? Nov 6, 2015 23:27 |
|
FoiledAgain posted:Thanks! I never noticed that option before. You can also click the crosshairs/bullseye icon just to the left of the gear icon to scroll to your currently editing file in the Project view without turning on the AutoScroll thingy.
|
# ? Nov 6, 2015 23:57 |
|
Thermopyle posted:You can also click the crosshairs/bullseye icon just to the left of the gear icon to scroll to your currently editing file in the Project view without turning on the AutoScroll thingy. Ohhh is that what that does. I poked it a few times and wondered LXML!!!
|
# ? Nov 7, 2015 00:35 |
|
I'm trying to figure out how I would go about renewing our Anaconda Accelerate/MKL license when they run out in a few month, and since the website upgrade, I don't understand anything anymore. Any pointers? I'm at a university and want to set it up on two or three systems. Also, I have a laptop that I actually mostly use on the move - a lot of that without web access. What happens if I set up MKL there - does my Numpy simply stop working when I'm on the train?
|
# ? Nov 7, 2015 15:08 |
|
Emacs Headroom posted:Once you're used to that, look into Scala -- you get the interactive notebook / REPL, static typing, compile time checking, and functional stuff all at once.
|
# ? Nov 7, 2015 17:03 |
|
Cingulate posted:I'm trying to figure out how I would go about renewing our Anaconda Accelerate/MKL license when they run out in a few month, and since the website upgrade, I don't understand anything anymore. Any pointers? I'm at a university and want to set it up on two or three systems. There shouldn't be a need to renew, MKL was just recently made available to everyone for free (log on to anaconda.org to download a license to use locally). But send me a PM and I will get you in touch with the right people if you still have questions/issues. FWIW I have relayed the problems around messaging to Travis, and we are working it. Still working through some growing pains, organizationally speaking.
|
# ? Nov 7, 2015 21:02 |
|
BigRedDot posted:There shouldn't be a need to renew, MKL was just recently made available to everyone for free (log on to anaconda.org to download a license to use locally). But send me a PM and I will get you in touch with the right people if you still have questions/issues. Just want to reiterate how awesome this is
|
# ? Nov 7, 2015 21:11 |
|
QuarkJets posted:Just want to reiterate how awesome this is Whenever complaining about anything continuum, it's just me saying "why do I only have one cherry on top? I want three!"
|
# ? Nov 7, 2015 23:49 |
|
Ah well, my 3.5/Anaconda/MKL woes continue. I've set up a new 3.5 environment, code:
code:
code:
code:
|
# ? Nov 9, 2015 00:51 |
|
Okay so I feel kinda embarrassed about this question. It's about an early Project Euler question: question 18. I should preface this by saying that I eventually figured out the correct solution, and it's way simpler than the solution I'm going to ask about. Here's one right way to do it: http://codepad.org/3fwfoSrN So there's probably much simpler/more elegant ways to write that, but it works just fine. You give it a filename, it reads the numbers in, and does its thing. The algorithm is applicable to the more difficult problem 67, as well. Here's the thing: I don't know anything about math, and these solutions don't come easily to me, so I originally came up with the idea of computing the answer with a "longest path" algorithm. I found Dijkstra's Algorithm on Wikipedia, converted the pseudocode to Python, and came up with: http://codepad.org/H0dHxtqN I can't figure out where my implementation is wrong; I've never implemented Dijkstra's Algorithm before. Either that, or I can't figure out why this algorithm is not sufficient to solve the problem. It actually works on the smaller example that Project Euler gives. Can anyone give me any hints? And sorry about my crappy code, or if it's hard to read. It's not too many lines, at least. Fergus Mac Roich fucked around with this message at 01:08 on Nov 11, 2015 |
# ? Nov 11, 2015 01:06 |
|
I don't think that algorithm applies here because you don't need to calculate the shortest path through the pyramid. You have to find the biggest number on each line. Turn the pyramid into a list of lists of integers, find the biggest integer in each list with max(), then sum() them at the end. edit: Ah, I see I misunderstood the problem. I looks like adjacency does matter. Ignore me in this case. But even still, I don't know that you have the right approach. The correct answer doesn't find the shortest route, because there is no shortest route. You have to take one number from every line. FoiledAgain fucked around with this message at 01:38 on Nov 11, 2015 |
# ? Nov 11, 2015 01:35 |
|
Is there a real difference between a shortest path and a longest path? You can see in the code there that I swapped the concepts around where appropriate. I suppose there's something I'm not understanding, but it seemed clear to me that the values of the numbers mapped neatly onto the concept of weights of nodes on a graph. All paths are the same number of nodes, but each node has a different weight, determined by the number the node represents in the triangle. In the first solution I linked, I did exactly what you said(okay i reread what you said and no I didn't do that but I did something that does work and is much simpler than a graph), but I am sort of a dummy and it took me a solid week to think of that. I'm just trying to make sure I have my head around why I was wrong.
Fergus Mac Roich fucked around with this message at 01:41 on Nov 11, 2015 |
# ? Nov 11, 2015 01:37 |
|
Fergus Mac Roich posted:but it seemed clear to me that the values of the numbers mapped neatly onto the concept of weights of nodes on a graph I don't think this works because in the pyramid you're limited in terms of which numbers you can select next. In other words, not all of the nodes are connected. If you selected the number in position p on row r, then in row r+1 you can only select the numbers in positions p-1, p, and p+1 (and if you selected the first or last number on a line, then of course you can't take p-1 or p+1).
|
# ? Nov 11, 2015 01:50 |
|
|
# ? May 9, 2024 18:18 |
|
Yeah... it's still not intuitive to me why this algorithm can't do this(note that my script does model the constraint you mentioned) but I guess I should have read further. There are other internet resources making it clear that this algorithm is just inapplicable to longest path in a DAG, assuming that I'm right that this problem actually can be modeled in that way. I guess I'll come back to this problem one day when I understand graph algorithms better and maybe it'll make more sense. At least I have a solution. Thanks.
Fergus Mac Roich fucked around with this message at 02:19 on Nov 11, 2015 |
# ? Nov 11, 2015 02:13 |