Hey guys,

I am a non-root user on a linux machine and I'm working with mpi4py.

I have an alias set to my python-2.7 that has all of the modules that I loaded into it. So if I type 'python' and then 'from mpi4py import MPI' everything is fine. The only problem is running something like 'mpirun -n 16 python helloworld.py' doesn't work because it is using the default python-2.6. I can't create a symbolic link (at least I don't think) because I'm not root. Is there anyway of doing this without typing out the full path each time?

Thanks!!

Recommended Answers

All 3 Replies

Yeah, I guess I could just put it into a script and run it that way. I was just running it from the command line. Is there no way to change what "python" means in the command line when it isn't the first string typed? It isn't a real problem, but it seems like you should be able to change that.

check your .profile and/or .bashrc to include the newer python's directory in your PATH. I have found it good practise to have ~/bin included automatically to path for users, maybe that is case in your system also, or you can add the $HOME/bin yourself? Then for all programs you install yourself, you can symlink the binaries to ~/bin.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.