LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 11-18-2015, 08:26 AM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Rep: Reputation: 51
Question 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.
 
Old 11-18-2015, 09:11 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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).
 
Old 11-18-2015, 10:53 AM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Question

Quote:
Originally Posted by berndbausch View Post
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.
 
Old 11-18-2015, 11:11 AM   #4
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Ask somebody with root access to install what you need. That's, presumably, their job. Why the need to make things difficult?
 
Old 11-18-2015, 11:51 AM   #5
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Arrow

Highly useful notes are found here:

"Whats the proper way to install pip virtualenv and distribute for python"

http://stackoverflow.com/questions/4324558/
 
Old 11-18-2015, 11:56 AM   #6
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by 273 View Post
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.
 
Old 11-18-2015, 12:01 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by dedec0 View Post
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?
 
Old 11-18-2015, 03:38 PM   #8
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by dedec0 View Post
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 View Post
(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 View Post
Can I install virtualenv without root access?
Yes. Which is precisely the point.
 
Old 11-22-2015, 10:04 AM   #9
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by berndbausch View Post
So I guess it adresses them.
No. It means that it is known.

Quote:
Originally Posted by berndbausch View Post
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 View Post
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
 
Old 11-22-2015, 08:15 PM   #10
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
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:
  1. Install virtualenv https://virtualenv.pypa.io/en/latest/installation.html
  2. Create an environment https://virtualenv.pypa.io/en/latest/userguide.html
  3. Enter it using the activate script https://virtualenv.pypa.io/en/latest/userguide.html
  4. Install whatever app I want to use in the virtual environment pip install whateveriwant.
  5. Run, develop, debug etc the application
  6. 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 View Post
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.
 
  


Reply

Tags
debian


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 4.3 - Cannot run fsck manually because root password is unknown BobbyMac Linux - Newbie 11 07-21-2013 10:20 PM
bzr / precise - how to override plugins path for an alternate installation of bzr? eantoranz Linux - Software 0 05-09-2012 09:47 AM
[SOLVED] How to allow access to some commands having root privleges to be run bu non root user suryashikha Linux - Newbie 8 10-31-2009 01:05 PM
How can a user access JBuilder9 installed as a root? CruelEssence Linux - Newbie 3 11-23-2003 12:22 PM
LimeWire installed as root, can't run if not root sulzla Linux - Newbie 1 07-01-2003 07:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration