Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-18-2015, 08:26 AM
|
#1
|
Senior Member
Registered: May 2007
Posts: 1,393
Rep:
|
How to run bzr (installed manually, no root access)
Hello,
the machine I'm using uses Ubuntu 14.04, but everything I do and want here should be naturally the same for other distros. I have no root access to this machine.
I downloaded and installed bzr for my user:
Code:
# Download the package
apt-get download bzr
# Extract it on a temporary directory
dpkg -x bzr_2.6.0+bzr6593-1ubuntu1.1_all.deb
# Move it to an user folder which is already in my PATH variable
mv etc usr ~/.localRootFolder
This works fine for many programs I need but can't install, or just don't want. Developed programs also benefit with these steps.
But, for bzr, I have this error I don't know how to solve:
Code:
$bzr branch lp:ubuntu/wily/org-mode #bazaar
bzr: ERROR: Couldn't import bzrlib and dependencies.
Please check the directory containing bzrlib is on your PYTHONPATH.
Traceback (most recent call last):
File "/home/me/.localRootFolder/usr/bin/bzr", line 74, in <module>
import bzrlib
ImportError: No module named bzrlib
I have "installed" bzrlib package with the the steps shown above. But it does not work.
What should I do in this and similar cases?
It seems the problem is solved before I made the post... LOL... I copied the extracted folder ./usr/lib/python2.7/dist-packages/bzrlib/ to my local path in ~/.localRootFolder/usr/bin/.
Any comments or possible problems with this, please tell me. I'm probably unaware of it.
----------------------
"Not-tags" I could not use for this thread:
ubuntu mint python install
Last edited by dedec0; 11-18-2015 at 10:01 AM.
|
|
|
11-18-2015, 09:11 AM
|
#2
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
If you want to run python programs in your own environment, you are a candidate for virtualenv, which will correctly set up libraries and paths.
You should also consider using pip install (when you are inside your virtual environment) instead of dkpg and install your programs from pypi.python.org.
Your error can proably be explained with a wrong Python lib path configuration variable (whose name I currently don't remember).
|
|
|
11-18-2015, 10:53 AM
|
#3
|
Senior Member
Registered: May 2007
Posts: 1,393
Original Poster
Rep:
|
Quote:
Originally Posted by berndbausch
If you want to run python programs in your own environment, you are a candidate for virtualenv, which will correctly set up libraries and paths.
You should also consider using pip install (when you are inside your virtual environment) instead of dkpg and install your programs from pypi.python.org.
Your error can proably be explained with a wrong Python lib path configuration variable (whose name I currently don't remember).
|
I don't want to look if a program is from pypi or not - like this one that I didn't even knew it is.
$PYTHONPATH... I imagined that it could be a solution, but it seems it may not be the case.
The site of virtualenv points a few problems with other Python virtual environments...
(Just a loose comment: why can't Python programs relay in simple things like many many other programs that exist?)
Can I install virtualenv without root access?? If I cannot do it, it is no solution at all, not even a starting one.
|
|
|
11-18-2015, 11:11 AM
|
#4
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Ask somebody with root access to install what you need. That's, presumably, their job. Why the need to make things difficult?
|
|
|
11-18-2015, 11:51 AM
|
#5
|
Senior Member
Registered: May 2007
Posts: 1,393
Original Poster
Rep:
|
Highly useful notes are found here:
"Whats the proper way to install pip virtualenv and distribute for python"
http://stackoverflow.com/questions/4324558/
|
|
|
11-18-2015, 11:56 AM
|
#6
|
Senior Member
Registered: May 2007
Posts: 1,393
Original Poster
Rep:
|
Quote:
Originally Posted by 273
Ask somebody with root access to install what you need. That's, presumably, their job. Why the need to make things difficult?
|
This is not possible. It is not difficult at all what I want. I run many programs without needing any root access to install or to use them for everything I need to do. So, I have no reason to want to install this Python program (as many others) for everybody if it is just me using it.
It being a program that everybody else may want is a possibility. But then we are assuming more about the whole world than what the truth is many times.
Also, eventually we just cannot wait. Why being jailed to make simple things? I don't think it is difficult at all. I think it's useful in many aspects.
Gladly, a neat solution appeared, I found it.  Although I don't need it now, since my Bazaar is working with the simple and almost naive solution.
|
|
|
11-18-2015, 12:01 PM
|
#7
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
|
Quote:
Originally Posted by dedec0
This is not possible. It is not difficult at all what I want. I run many programs without needing any root access to install or to use them for everything I need to do. So, I have no reason to want to install this Python program (as many others) for everybody if it is just me using it.
It being a program that everybody else may want is a possibility. But then we are assuming more about the whole world than what the truth is many times.
Also, eventually we just cannot wait. Why being jailed to make simple things? I don't think it is difficult at all. I think it's useful in many aspects.
Gladly, a neat solution appeared, I found it.  Although I don't need it now, since my Bazaar is working with the simple and almost naive solution.
|
The fact that anything runs without root saying so seems more like an accident than design. Assuming your development team is set up to run without root permissions your system administrators are still being paid to help you and should know when issues happen so that things will continue to work smoothly. I really don't see any reason not to involve your system administrators here and every reason to do so. Aren't you all working for the same company to the same ends?
|
|
|
11-18-2015, 03:38 PM
|
#8
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
Quote:
Originally Posted by dedec0
The site of virtualenv points a few problems with other Python virtual environments...
|
So I guess it adresses them.
Quote:
Originally Posted by ashi.srma1986
(Just a loose comment: why can't Python programs relay in simple things like many many other programs that exist?)
|
You mean things like libraries? And the need to be root to install software? Seems to me that other software does the same thing. Let's not turn this into a flame war though.
Quote:
Originally Posted by ashi.srma1986
Can I install virtualenv without root access?
|
Yes. Which is precisely the point.
|
|
|
11-22-2015, 10:04 AM
|
#9
|
Senior Member
Registered: May 2007
Posts: 1,393
Original Poster
Rep:
|
Quote:
Originally Posted by berndbausch
So I guess it adresses them.
|
No. It means that it is known.
Quote:
Originally Posted by berndbausch
You mean things like libraries? And the need to be root to install software? Seems to me that other software does the same thing. Let's not turn this into a flame war though.
|
No.
Quote:
Originally Posted by berndbausch
Yes. Which is precisely the point.
|
The point is to have clear instruction on how to install something without root and to show how to run a program (also without being root). https://virtualenv.pypa.io/en/latest/installation.html does not show this.
If you do not want to help, please stop saying your opinion against the idea. I'm sure there are more people around here that will be happy to answer within my needs. Thank you very much
|
|
|
11-22-2015, 08:15 PM
|
#10
|
LQ Addict
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316
|
While the original poster seems to be happy with another solution, others might want to know how to use virtualenv. This is what I usually do:
- Install virtualenv https://virtualenv.pypa.io/en/latest/installation.html
- Create an environment https://virtualenv.pypa.io/en/latest/userguide.html
- Enter it using the activate script https://virtualenv.pypa.io/en/latest/userguide.html
- Install whatever app I want to use in the virtual environment pip install whateveriwant.
- Run, develop, debug etc the application
- Exit the virtual environment using the deactivate script https://virtualenv.pypa.io/en/latest/userguide.html
Later, each time I want to use the application in the virtual environment, steps 3, 5 and 6 again.
Quote:
Originally Posted by dedec0
If you do not want to help, please stop saying your opinion against the idea. I'm sure there are more people around here that will be happy to answer within my needs. Thank you very much
|
Strange comment from someone who received tips and gave her/his own opinion.
|
|
|
All times are GMT -5. The time now is 11:24 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|