How to delete extra Python install? - command-line

I'm still pretty new to the command line and I think I accidentally installed Python 3.5 twice. The path currently looks like this, how do I delete the extra install?
$ echo $PATH
/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

Related

Ubuntu 14.04 upgrade broke all my virtualenvs

I've seen a couple of fixes for this, but none have worked for me, but I gather that its my virtualenvs that got broken. I just upgraded to 14.04 from 12.04, and now all my pyramid applications no longer work.
When I run ../bin/pserve development.ini, I get the following error:
ImportError: No module named _ctypes
When I run ../bin/python setup.py develop, (also when I try run pshell) I get:
ImportError: No module named _io
I've fixed one project (each pyramid app is in a separate virtualenv) by first removing the old project folder, then reinstalling the virtualenv instance and then copying my scripts back into it. But this is time consuming, and I have several projects.
Is there a quick fix for this?
I've seen removing duplicates of python and simple reinstall of virtualenv, but removing duplicates is not a good option, and the second solution didn't work for me. But maybe I did something wrong there.
I really think that there should be a quick fix for this. Surely reinstalling all virtualenvs cannot be the only solution?
You can simply do
cp /usr/bin/python2 /path/to/my-virtualenv/bin/python2
or
cp /usr/bin/python3 /path/to/my-virtualenv/bin/python3
(Don't need to make a new virtualenv.)
A quick fix that works is to create a new virtualenv and copy its bin/python to the broken virtualenvs. Five simple steps:
mkvirtualenv lero
cd ~/.virtualenvs
for d in */; do cp lero/bin/python $d/bin/python; done
deactivate
rmvirtualenv lero

problems installing multiple versions of perl including latest

I have perl 5.8.8 installed in /usr/bin/perl
I need to use a later version, so am trying to install another version in a different place.
(nb. I started out trying to install perlbrew but on the linux server I'm using but that's not working - am getting all sorts of certificate problems).
I logged in as root and followed the instructions here, to install perl from source:
http://www.cpan.org/src/
This gave me an install of perl in
/root/localperl/bin/perl
I thought that didn't look right so I copied that the localperl directory to /usr
cp -r localperl/ /usr/
Now I can run a script in my /home/myusername/ directory by using
/usr/localperl/bin/perl
So I guess that looks more normal for an alternate install of perl, though:
a) Am not sure this is correct. So the question is if I stick #!/usr/localperl/bin/perl as the first line in every script, will all be fine?
b) Have no idea what to do to install modules for this new version. So:
i) What to do to build latest versions of modules for this version?
ii) Can I copy across all my existing modules that work with 5.8.8?
(Yes, I did attempt to read the doc and saw there were lots of options for configuring the install, but having tried one or two found this was even more confusing). Any specific help on the above appreciated.

Can I use the embedded hg command line in SourceTree?

I'm really happy that SourceTree has Mercurial embedded. On the odd occasion I would like to run an hg command from the CLI, like
hg status
To which I get
hg: command not found
Can I make modifications to my environment path to get the command line working for the embedded version, or do I have to install and manage a separate instance of Mercurial if I want to accasionally use the command line?
I'm using SourceTree OS X version 1.7.2
(This might be a superuser question, but I thought this community has a better chance of knowing and responding.)
The binary lies within SourceTree's bundle, in the resources-folder and is called hg_local.
/Applications/SourceTree.app/Contents/Resources/mercurial_local
You might want to alias it somewhere else (like /usr/local/bin) and rename it on the go:
ln -s /Applications/SourceTree.app/Contents/Resources/mercurial_local /usr/local/bin
It might be a better idea to use some package manager and install mercurial from their repositories, eg. Homebrew. This can be done within few minutes and you gain easy access to lots of other command line tools you might want.
# First install homebrew, than run this command
brew install mercurial

how to uninstall doxygen using make file on Ubuntu (12.04)?

I am using Ubuntu 12.04. I have installed doxygen 1.8.3.1 using make install.
I would like to uninstall the doxygen built by make, but I don't find any way to do it using make (uninstall or clean...).
In the Makefile there is no reference to uninstall it the software. :(
Unfortunately I can't use the sudo apt-get remove doxygen because it wasn't an installed. :(
I don't find anything related on the internet.
Can anyone help me, please?
Thank you in advance,
Fabiola
There is no "uninstall" target. You need to do a "rm" be hand. If you used the standard prefix path "/usr/local" then
rm /usr/local/bin/doxygen
rm /usr/local/man/man.1/doxygen.1
(more if you install the docs are wizard). Depend on the user used for install, you need sudo to do it.
I know this question is old, but since it is the first result in google I would like to share another way of uninstalling Doxygen built from source. In the build directory where you've ran make there should by a file name install_manifest.txt. That file contains paths to files that were installed using make install command. All you need to do is to run the following command:
sudo xargs rm < install_manifest.txt
Of course this assumes that you've kept the build directory or at least the install_manifest.txt file. If not you need to remove the files by hand as somebody already suggested.

Howto update Perl v5.8.8 for git?

I have following Problem.
I want to build Qt5 by my own, to be able to use it with Visual Studio 2012. I followed the instructions in the Qt Wiki.
My problem is that when I try to call init-repository
perl init-repository
I get following error:
Hint: Make sure that Perl is added to the path in front of git since that ships an outdated version (Perl 5.8), which will cause the scripts to fail.
This is because the with git shipped perl version is 5.8.8. It doesn't matter, that I have the newest version installed.
Can someone tell me how to update my perl version inside git, to be able to build Qt5?
Regards
It sounds like you are working on Windows, I assume with some recent version of msysgit.
If you are using the shell that comes with msysgit, then it is likely that the shell has modified your PATH variable to put /bin ahead of /c/path/to/new/perl. You can check this by opening the shell and running echo $PATH or even which perl.
To make the shell use you 'new' perl, you can try the following:
export PATH=/c/path/to/new/perl:$PATH