I have Python 2.7.3 and 3.2.3 installed on my Ubuntu 12.04 64bit (by default?). When I type "python", I want python 3.2 instead of 2.7.  Changing symlink "python" to link to python3 seems to cause big problems. Why is that and is there a way to do that?  lrwxrwxrwx 1 root root       7 Sep 28 19:15 python -&gt; python2 lrwxrwxrwx 1 root root       9 Jun 18 13:26 python2 -&gt; python2.7 -rwxr-xr-x 1 root root 2993592 Apr 10 02:46 python2.7 -rwxr-xr-x 1 root root    1652 Apr 10 02:46 python2.7-config lrwxrwxrwx 1 root root      16 Jun 18 13:26 python2-config -&gt; python2.7-config lrwxrwxrwx 1 root root       9 Apr 10 17:12 python3 -&gt; python3.2 lrwxrwxrwx 1 root root      11 Apr 10 02:13 python3.2 -&gt; python3.2mu -rwxr-xr-x 1 root root 2949952 Apr 10 02:13 python3.2mu lrwxrwxrwx 1 root root      11 Apr 10 17:12 python3mu -&gt; python3.2mu lrwxrwxrwx 1 root root      16 Jun 18 13:26 python-config -&gt; python2.7-config   I linked python to python3:  sudo ln -fs python3 python   It worked but later it forced me to change the link back because Ubuntu seems not much responsive and I can't run most of the applications any more, such as Variety, Spyder, Okular, Software Center, etc.  Edit: Yes, the 2 answers in the marked duplicate question  addressed half of my question, and the question itself doesn't seem to be related to my question when I try to search for an answer. I doubt anyone would realize the answer is below that question.
I'm new to Linux and am trying to set up Python / Django on my machine!  I installed Python 3.3 from the source file and it was compiled into /usr/local/bin. Then I created a symbolic link between /usr/bin/python and /usr/local/bin/python3, so that whenever I invoke python from the command line it uses the latest version.  Now I am trying to install MySQL Python and I got the following output:  apt-get install python-mysqldb  Reading package lists... Done Building dependency tree Reading state information... Done python-mysqldb is already the newest version. The following extra packages will be installed:   apt-listchanges python-apt Suggested packages:   python-glade2 python-gtk2 python-apt-dbg python-vte python-apt-doc The following packages will be upgraded:   apt-listchanges python-apt 2 upgraded, 0 newly installed, 0 to remove and 142 not upgraded. 3 not fully installed or removed. Need to get 0 B/394 kB of archives. After this operation, 250 kB of additional disk space will be used. Do you want to continue [Y/n]? Y Traceback (most recent call last):   File "/usr/bin/apt-listchanges", line 28, in &lt;module&gt;     import apt_pkg ImportError: No module named 'apt_pkg'   Any ideas on how to fix this?  Or any tips on how to clean up this install (if this one is too broken)?
Will my device work with Ubuntu? Prove that if a number $n > 1$ is not prime, then it has a prime factor $\le \sqrt{n}$. NewForm.aspx disappeared I've heard of kits that can fix your Xbox 360 if you happen to get the . Do any of these work, and do they void your warranty? Are there any other noteworthy tips or tricks? .NET - How can you split a "caps" delimited string into an array? How do I go from this string: "ThisIsMyCapsDelimitedString"  ...to this string: "This Is My Caps Delimited String"  Fewest lines of code in VB.net is preferred but C# is also welcome.  Cheers! There used to be a place where you could buy Stack Exchange branded gear, what happened to it? $\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx$ Trying to compute   I was facing: \begin{align}J=\int_0^\infty \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx\end{align}  I want to prove that $\displaystyle J=0$, or equivalently, that,  \begin{align}\int_0^1 \frac{\ln\left(1+x-\sqrt{2x}\right)}{1+x^2}\,dx=-\dfrac{1}{2}\text{G}\end{align}  $\text{G}$ being the Catalan constant.  Read carefully please.   I know, using so-called Feynman's trick, how to prove this. I would like to obtain a proof, using only integration by parts and change of variable in simple integrals (that is, no multiple integrals) I don't know, if, under these restrictions, such computation is possible.  NB: You're probably wondering what is the link between : $\int_{0}^{\frac{\pi}4} \ln(\sin{x}+\cos{x}+\sqrt{\sin{2x}})dx$ and $J$.  The link is, for $x\in\left[0;\frac{\pi}{2}\right]$, $(\sin{x}+\cos{x}+\sqrt{\sin{2x}})(\sin{x}+\cos{x}-\sqrt{\sin{2x}})=1$ and $\sin(2x)=2\sin x\cos x$ When should I use "shall" versus "will"? Which is the correct use of these two words, and in which context should one be used rather than the other? I heard about nautilus-gksu and would like to install it. Unfortunately, when I try, I get this:  glemi@XPS:~$ sudo apt-get install nautilus-gksu Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package nautilus-gksu   How and where can I get this package? Show that $g\circ f\equiv 0$ implies $\det Df\equiv 0$, where $g(x_1,...,x_n)=x_1^5+...+x_n^5$ Let $f:\mathbb{R}^n \rightarrow \mathbb{R}^n$ be a smooth function and let $g:\mathbb{R}^n \rightarrow \mathbb{R}$ be defined by $g(x_1,...,x_n)=x_1^5+...+x_n^5$. Suppose $g\circ f\equiv 0$. Show that $\det Df\equiv 0$.  I was going to start the solution from $n=2$ and then use induction on $n$.  So, for $n=2$, $f:\mathbb{R}^2 \rightarrow \mathbb{R}^2$ is a smooth function and $g:\mathbb{R}^2 \rightarrow \mathbb{R}$ where $g(x_1,x_2)=x_1^5+x_2^5$. Then $Df=\begin{pmatrix}   f_{x_1x_1} &amp; f_{x_1x_2}  \\   f_{x_2x_1} &amp; f_{x_2x_2}   \end{pmatrix}$  But now I am stuck in proving the result. Am I in the correct track? Can anyone plese give me a hint to continue?  Ok so since $g\circ f$ is $0$, the image of $f$ is the line $x_1+x_2=0$ which has no min, max or saddle.   If det$Df(x_0)&gt;0$ and $f_{x_1x_1}(x_0)&gt;0$ OR det$Df(x_0)&gt;0$ and $f_{x_1x_1}(x_0)&lt;0$, we have contradiction.   But if det$Df(x_0)&gt;0$ and $f_{x_1x_1}(x_0)=0$, then det$Df(x_0)=0$ or, det$Df(x_0)&lt;0$(Since $f_{x_1x_2}=f_{x_2x_1}$). So this is impossible.  If det$Df(x_0)&lt;0$ we have saddle and it is impossible.   So finally we conclude that det$Df(x)=0$ for all $x$. Am I correct? Are the contents of a loot box determined at the time it is awarded or when it is opened?  For example, if you collect multiple loot boxes before a special event but opened them during the special event, would they have the potential of spawning rewards from that event? I am trying to run some unit tests in a C# Windows Forms application (Visual Studio 2005), and I get the following error:  System.IO.FileLoadException: Could not load file or assembly 'Utility, Version=1.2.0.200, Culture=neutral, PublicKeyToken=764d581291d764f7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)** at x.Foo.FooGO() at x.Foo.Foo2(String groupName_) in Foo.cs:line 123 at x.Foo.UnitTests.FooTests.TestFoo() in FooTests.cs:line 98** System.IO.FileLoadException: Could not load file or assembly 'Utility, Version=1.2.0.203, Culture=neutral, PublicKeyToken=764d581291d764f7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  I look in my references, and I only have a reference to Utility version 1.2.0.203 (the other one is old). Any suggestions on how I figure out what is trying to reference this old version of this DLL file? Besides, I don't think I even have this old assembly on my hard drive. Is there any tool to search for this old versioned assembly? How do I redirect a domain to another domain locally? My /etc/hosts file looks like this:  127.0.0.1       localhost 10.20.7.67      testsitealpha.dev othersite.dev   testsitebeta.dev   The first two work. The last one doesn't. Why not? How do I make it work? The reason I am doing this, is because I have a test server (othersite.com), which is on the local network, but it's ip can vary. e.g. 10.20.7.98 one day, 10.20.7.35 another, etc.  So, how do I make my system always resolve testsitebeta.dev to the same ip as othersite.dev? Effective Sample Size for posterior inference from MCMC sampling When obtaining MCMC samples to make inference on a particular parameter, what are good guides for the minimum number of effective samples that one should aim for?  And, does this advice change as the model becomes more or less complex? Let $ \sigma(A)$ be the set of all eigenvalues of $A$. Show that $ \sigma(A) = \sigma\left(A^T\right)$ where $A^T$ is the transpose matrix of $A$. How can I reliably and accurately identify the passive voice in writing or speech? I'm not interested in advice about whether or not to use it yet... I just want to know for sure what it is, so that I don't look as stupid as . I installed the ubuntu 12.04 server edition for my server pc . i had installed lamp server. i need to change the var/www location to my secondary hard disk location. i was configured so many time to at gedit /etc/apache2/sites-available/default here is my code  &lt;VirtualHost *:80&gt;     ServerAdmin webmaster@localhost      #DocumentRoot /var/www     DocumentRoot /media/myserver/     &lt;Directory /&gt;         Options FollowSymLinks         AllowOverride None     &lt;/Directory&gt;     #&lt;Directory /var/www/&gt;         &lt;Directory /media/myserver/&gt;         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     &lt;/Directory&gt;      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/     &lt;Directory "/usr/lib/cgi-bin"&gt;         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     &lt;/Directory&gt;      ErrorLog ${APACHE_LOG_DIR}/error.log      # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     LogLevel warn      CustomLog ${APACHE_LOG_DIR}/access.log combined      Alias /doc/ "/usr/share/doc/"     &lt;Directory "/usr/share/doc/"&gt;         Options Indexes MultiViews FollowSymLinks         AllowOverride None         Order deny,allow         Deny from all         Allow from 127.0.0.0/255.0.0.0 ::1/128     &lt;/Directory&gt;  &lt;/VirtualHost&gt;   and also used  sudo chown -R var/www /media/myserver/   and  chmod -R 755 /media/myserver/   still i was not able to connect my /media/myserver and my browser show the following message  Forbidden  You don't have permission to access / on this server.   Please tell anyone how to mount myserver at my var/www, thanks advance How to remove items from a list while iterating? Using PyQGIS to transform layer of polygons into layer of holes inside bbox? I'm using python in QGIS. I have a layer of polygons (its a result of some earlier dissolving and has no overlapping polygons but some holes and islands in holes etc). I want to build a new layer which contains one polygon representing a bbox of the first layer with each polygon cut from it.  Essentially I want to "invert" the layer I have so that where the was polygon, now there is not, and where there was not polygon now there is. All inside a bounding box of the original layer.  I can build a bbox easily and I tried to "subtract" the polygon layer from my new bbox polygon layer but the process slows to a stop and then crashes my PC. Here's the algorythm  processing.runalg("qgis.difference","path/to/polygon.shp","path/to/bbox.shp","path/to/result.shp")   I dont care about attributes (obviously). I just need to cut one set of polygons from one larger polygon.  It seems so simple, I wish I could find a simple command or script to acheive this. As stated at the top I'm looking for a solution in python in QGIS. I have this table but check constraint is throwing me an error:     Column CHECK constraint for column 'MedicamentRegulated' references another column, table 'Medicaments'.   I've seen this as allowed in SQL Server but I don't know why it doesn't work :/  CREATE TABLE Medicaments ( MedicamentID INT NOT NULL IDENTITY(1,1) PRIMARY KEY, Name VARCHAR(50), DateValidity DATE, MedicamentRegulated BIT CHECK((MedicamentRegulated = 1 AND DateValidity IS NOT NULL)    OR MedicamentRegulated = 0) )