How would one set up python 2.7 and python 3.x on the same computer. Most of my old code is in 2, but a platform I am trying to use uses 3. How do I setup an enviroment in which I can work on both easily. I am using Ubuntu 13.10 by the way, so no Windows exclusives.
You pretty much said it in your question. You need to setup an environment, a virtualenv to be precise. Check this answer: https://stackoverflow.com/a/1534343/276451 it's exactly what you're looking for.
Related
Disclaimer:
First, I apologise if I'm incorrectly applying technical terms here or, worse, completely misunderstanding things. I'll edit if corrected.
Context:
Lately I've been building and deploying some basic website ideas to Heroku using the Django framework. I've been doing this on Windows, using venv as my virtual environment "wrapper". I've been building these exclusively from the command line interface.
I also have a MacBook that I'd like to use to access and manage those websites, and in future, larger projects. I would prefer not to install Windows on this MacBook.
To be clear, I know that it's possible to build and deploy a website using Django and Heroku on macOS. I know there are, at the very least, some syntactical differences in how I would approach this from the CLI versus Terminal.
Desired outcome:
I would like to set up a website in the fashion indicated above on Windows or macOS, and then access and manipulate it from the other OS.
Questions:
Is this possible? (Or if I set it up on Windows must I only use Windows to manage it?)
If I set up a website in this fashion using Django, Heroku, and venv on Windows, how (if at all) might I then access and manipulate that website from macOS? I think what I'm mostly stuck on is that, as far as I can tell, I can't use the same virtual environment on both Windows and macOS (I believe venv is itself Windows-only).
Is it possible to "wrap" my website in both venv (Windows) and virtualenv (macOS)?
Am I correct in thinking the only real (i.e. non-syntactical) difference that I need to account for is the virtual environment itself?
--
Sorry if I have massive gaps in my knowledge. I'm self-taught and have historically been terrible at asking for help. I'm trying to fill the gaps by improving my question-asking.
Finally, I suspect that the fact I'm using Heroku may be irrelevant, but I'm including that information in case I am mistaken.
Yes, for most of the projects, you will be able to develop your Django web site on Windows, MacOS and Linux simultaneously. Your virtual environment "wrapper" doesn't really matter, you will use or install and use the one you like or available on your OS.
Then you will learn about Docker.
I need to run several analyses with OpenAeroStruct on Python 2.7.15 on a Windows 8.1 platform. These are quite computationally expensive so I'm aware that using Fortran could improve performances but on OpenAeroStruct main github page (https://github.com/mdolab/OpenAeroStruct) it is stated that "there is no documented Windows support for the Fortran code". However, I found this question here: Failure to import pyOptSparseDriver that seems to be similar to my issue. If so, how do I install the pyoptsparse library ? I tried to copy the github in my python folder but still the driver seems not to be working.
The usage of pyOptSparse and the usage of Fortran for OpenAeroStruct are independent of each other. Compiling and using the Fortran version of the code will give you the biggest performance gain.
However, as you've found, successfully compiling this Fortran code on Windows is not straightforward. I'd suggest one of three options:
Obtain a system with Ubuntu Linux or Mac OS to use the Fortran version of the code.
Attempt to use Cygwin and a Fortran compiler to set up an environment within Windows where you could successfully install and run OpenAeroStruct's Fortran code.
You could set up an Ubuntu virtual environment within your Windows system, though this would take time and effort to set up and would be less computationally efficient than running it natively.
We are just starting some cloud-based apps based on Python + Django and we have a small dilemma. At first we decided to go with Python 3.3, but than we saw that a lot of libraries/modules have not been ported yet, thus we might have to do extra work to make sure that everything works with Python 3.3.
Given the fact that the projects that we are starting will have a time frame of a few years what advice would you give us? To go with Python 2.7 or Python 3.3?
Thanks in advance!
Go with Python 2.7 for now. Make sure that your code translates cleanly when using 2to3. When the modules are available for Python 3.x, translate your code and run with it.
I would like to start programming in OCaml. As I am a Windows user, I understand that it is preferred to do so using the OCaml plugin for Netbeans.
I have downloaded the aforementioned plugin from the following link: http://ocamlplugin.loki-a.com/ocamlplugin/updates/ . I have installed the plugin into Netbeans as instructed. I managed to open a project but even the sample "Hello World" won't run.
I then tried to install the OCaml IDE from here: http://ocamlplugin.loki-a.com/index.php?title=Main_Page#Download_2 , but it still wouldn't run anything.
I am not interested in working with Eclipse because that would include downloading Cygwin.
I would appreciate a simple solution. Thank you! :)
I would suggest OCaIDE under Eclipse, if you stick to Windows anyway.
But I don't understand your reluctancy to use cygwin, especially when there is such nice step-by-step tutorial for configuring cygwin for OcaIDE and Eclipse.
Another option, which I haven't tried but would strongly suggest you trying, is Sublime Text 2. It supports OCaml and is a very popular cross-platform text editor. But since I haven't tried it, I would not be able to provide you with details about it. Although it comes with a cost, you can evaluate it for free without time limit.
TypeRex has been my favourite for OCaml so far, and you can now use Emacs in Windows, so with some workaround in cygwin you can use TypeRex in Windows.
Another option is to use VirtualBox, install a normal linux distro and use Typerex+Emacs inside it. It is also not complicated, as it takes 1 hour to config at most.
The ocaml links that you gave have not been touched since 2009 (4 years ago). That probably means the odds of them running with the current NetBeans are equivalent to the proverbial sphere of solidified water in the Christian place of eternal theological punishment.
Since you are asking about running under Cygwin, it sounds like you want a Linux version of Eclipse as well. Eclipse runs quite well under Win7, at least, and under Mint (I use them under both) However, all my attempts to get ANY OCaml IDE running under either system have been borged (resistance is futile, and depends and capacitance anyway).
So, under Mint 15, emacs and vim (the old standards) work well as text editors. I wish I could suggest anything else.
Good luck!!!
By now, another option has appeared for Windows 10 users wanting to use OCaml: the Windows Subsystem for Linux.
Basically, what it does is that it allows you to run Bash and any non-GUI Linux program on your PC. Once installed, you can install OCaml and OPAM with apt-get and you're good to go.
As far as I am concerned, I use Windows 10 on my desktop PC, and I haven't had any inconvenience with WSL yet.
I personally use Merlin/... which is are plugins for emacs. But I can understand that you dont want to use emacs. I have been told that the support with Visual Studio Code is supposed to be quite good, especially when using it together with the builtin console. Also for smaller things there is Ocamltop but I have now idea how the Windows support is. In the end I suggest, using the Linux Shell on Windows as RichouHunter suggests.
I need to use Eclipse on a Linux Virtual Box virtualization, Windows XP host, on a laptop. I don't know the specs of that laptop, but it's less than 2 years old.
My first choice of Linux distribution is Ubuntu, but I've heard that in Ubuntu, Eclipse is can be bugged or slow. I don't mind if it's slow. I only need to know if there is a risk that it might not work, since I have a limited time to install and try that.
I would also like to know about any other linux distribution that does or does not work fine for you with Eclipse.
Note: I only need to build a C++ project.
Eclipse runs on Java.
Any linux distro (apart from command line ones) will do.
If you like Ubuntu go with it!
Ubuntu will work just fine as an OS. I use eclipse in Ubuntu running on a VM in a cloud somewhere. So I can just remote desktop into it and pick up where I left off.
Ubuntu should be OK. Just make sure to use the Sun's official Java (its in the repository) and not the openjdk (which is the default). For what I hear, this may speedup the things a little bit.
Disclaimer: I did not try to replace java.
I'd hesitate at suggesting a distro like Ubuntu for your machine -- look at something like Arch which is simple to setup and relatively lean.