Tully Foote | 6 Aug 2012 03:04
Favicon
Gravatar

Replacement of PIP installed tools with apt based installation

Hi All, 


Last month we ran into some problems when we were using two different release mechanisms for installing code. There was a thread on ros-users you can find in the archives [1] The primary issue was that some packages were coming from apt and some from pip resulting in an apt-get update being able to break the working system as the pip based packages would not get updated at the same time.  

The cleanest solution is to stop using both pip and apt on the same system.  Thus I announce that all the packages which we were previously recommending using pip to install are now available through apt on Ubuntu and using apt is the recommended way to install them.  

If you have previously installed using pip it is recommended to uninstall using pip the tools now available through apt.  I will attach instructions for uninstalling these tools below.  

These tools include, rospkg, rosdep, rosinstall, vcstools, and rosrelease.  In apt they are named python-PACKAGENAME, such as python-rospkg.  

Tully




Uninstallation Instructions:

If you have pip installed a package you can use pip to uninstall the package if you have pip version 1.1 or greater.  

sudo pip uninstall PACKAGE_NAME

Caveats, on machines like lucid are that you will have to `pip install pip` to get the new version.  Also pip uninstall regularly leaves scripts in /usr/local/bin  after uninstalling it is recommended to remove any executable from /usr/local/bin starting with ros such as rosws rosco rosinstall... If you have installed something else starting with the ros name be careful, and possibly leave it alone.  

If you are having trouble with any scripts you can type 'which SCRIPTNAME` to determine which executable is being run.  If it's in /usr/local/bin you are still using the pip based version.  All of the apt based tools will be in /usr/bin.  


<div>
<p>Hi All,&nbsp;</p>
<div><br></div>
<div>Last month we ran into some problems when we were using two different release mechanisms for installing code. There was a thread on ros-users you can find in the archives [1] The primary issue was that some packages were coming from apt and some from pip resulting in an apt-get update being able to break the working system as the pip based packages would not get updated at the same time. &nbsp;</div>

<div><br></div>
<div>The cleanest solution is to stop using both pip and apt on the same system. &nbsp;Thus I announce that all the packages which we were previously recommending using pip to install are now available through apt on Ubuntu and using apt is the recommended way to install them. &nbsp;</div>

<div><br></div>
<div>If you have previously installed using pip it is recommended to uninstall using pip the tools now available through apt. &nbsp;I will attach instructions for uninstalling these tools below. &nbsp;</div>
<div><br></div>
<div>These tools include, rospkg, rosdep, rosinstall, vcstools, and rosrelease. &nbsp;In apt they are named python-PACKAGENAME, such as python-rospkg. &nbsp;</div>
<div><br></div>
<div>Tully</div>
<div><br></div>
<div><br></div>

<div>[1]&nbsp;<a href="https://code.ros.org/lurker/thread/20120705.075600.163311e9.en.html#i20120705.075600.163311e9" target="_blank">https://code.ros.org/lurker/thread/20120705.075600.163311e9.en.html#i20120705.075600.163311e9</a>
</div>

<div><br></div>
<div><br></div>
<div>Uninstallation Instructions:</div>
<div><br></div>
<div>If you have pip installed a package you can use pip to uninstall the package if you have pip version 1.1 or greater. &nbsp;</div>
<div><br></div>
<div>sudo pip uninstall PACKAGE_NAME</div>
<div><br></div>
<div>Caveats, on machines like lucid are that you will have to `pip install pip` to get the new version. &nbsp;Also pip uninstall regularly leaves scripts in /usr/local/bin &nbsp;after uninstalling it is recommended to remove any executable from /usr/local/bin starting with ros such as rosws rosco rosinstall... If you have installed something else starting with the ros name be careful, and possibly leave it alone. &nbsp;</div>

<div><br></div>
<div>If you are having trouble with any scripts you can type 'which SCRIPTNAME` to determine which executable is being run. &nbsp;If it's in /usr/local/bin you are still using the pip based version. &nbsp;All of the apt based tools will be in /usr/bin. &nbsp;</div>

<div><br></div>
<div><br></div>
<div>
<div><br></div>-- <br>Tully Foote<br><a href="mailto:tfoote@..." target="_blank">tfoote <at> willowgarage.com</a><br><a href="tel:%28650%29%20475-2827" value="+16504752827" target="_blank">(650) 475-2827</a><br>
</div>
</div>
Jack O'Quin | 8 Aug 2012 17:56
Picon
Gravatar

Re: Replacement of PIP installed tools with apt based installation

On Sun, Aug 5, 2012 at 8:04 PM, Tully Foote <tfoote@...> wrote:
> Hi All,
>
> Last month we ran into some problems when we were using two different
> release mechanisms for installing code. There was a thread on ros-users you
> can find in the archives [1] The primary issue was that some packages were
> coming from apt and some from pip resulting in an apt-get update being able
> to break the working system as the pip based packages would not get updated
> at the same time.
>
> The cleanest solution is to stop using both pip and apt on the same system.
> Thus I announce that all the packages which we were previously recommending
> using pip to install are now available through apt on Ubuntu and using apt
> is the recommended way to install them.
>
> If you have previously installed using pip it is recommended to uninstall
> using pip the tools now available through apt.  I will attach instructions
> for uninstalling these tools below.
>
> These tools include, rospkg, rosdep, rosinstall, vcstools, and rosrelease.
> In apt they are named python-PACKAGENAME, such as python-rospkg.
>
> Tully
>
>
> [1]
> https://code.ros.org/lurker/thread/20120705.075600.163311e9.en.html#i20120705.075600.163311e9
>
>
> Uninstallation Instructions:
>
> If you have pip installed a package you can use pip to uninstall the package
> if you have pip version 1.1 or greater.
>
> sudo pip uninstall PACKAGE_NAME
>
> Caveats, on machines like lucid are that you will have to `pip install pip`
> to get the new version.  Also pip uninstall regularly leaves scripts in
> /usr/local/bin  after uninstalling it is recommended to remove any
> executable from /usr/local/bin starting with ros such as rosws rosco
> rosinstall... If you have installed something else starting with the ros
> name be careful, and possibly leave it alone.
>
> If you are having trouble with any scripts you can type 'which SCRIPTNAME`
> to determine which executable is being run.  If it's in /usr/local/bin you
> are still using the pip based version.  All of the apt based tools will be
> in /usr/bin.

I tried to follow your instructions, but am having some problems. All
the python-* packages installed OK except this one:

$ sudo apt-get install python-rosrelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-rosrelease

Pip said it uninstalled all the pypi packages, but pip freeze still
mentions vcstools, and rosinstall does not seem to have been cleared
out properly:

$ rosws
ERROR Cannot find rosinstall libraries, check your installation. One
frequent cause is that rosinstall 0.5 is still installed in
/usr/local/lib.
No module named rosinstall.rosws_cli
joq <at> vision-4:osm_cartography$ which rosws
/usr/bin/rosws

All this just underscores the importance of the new Debian install
recommendation. My system was updated many times using pip and
easy_install and seems to be badly broken at this point. Looks like I
am going to be deleting /usr/local files by hand until something
starts to work again.

--

-- 
 joq
Jack O'Quin | 8 Aug 2012 18:13
Picon
Gravatar

Re: Replacement of PIP installed tools with apt based installation

The python-rosinstall package seems to put its modules in
/usr/share/pyshared/rosinstall. That is not getting resolved via
import.

How am I supposed to add that to $PYTHONPATH?
--

-- 
 joq
Lorenz Mösenlechner | 8 Aug 2012 18:19
Picon
Favicon

Re: Replacement of PIP installed tools with apt based installation

Hi Jack,

On my system (Ubuntu Oneiric) it is actually resolved (import
rosinstall works). As I understand it, debian packages are supposed to
put their python files in /usr/share/pyshared. See
http://wiki.debian.org/Python/Policy, in particular:

 /usr/share/pyshared: Every file into this directory is made available
in /usr/lib/pythonX.Y/site-packages, if the package supports pythonX.Y
and pythonX.Y is installed on the system. This directory is not
directly included in sys.path.

Lorenz

On Wed, Aug 8, 2012 at 6:13 PM, Jack O'Quin <jack.oquin@...> wrote:
> The python-rosinstall package seems to put its modules in
> /usr/share/pyshared/rosinstall. That is not getting resolved via
> import.
>
> How am I supposed to add that to $PYTHONPATH?
> --
>  joq
> _______________________________________________
> ros-users mailing list
> ros-users@...
> https://code.ros.org/mailman/listinfo/ros-users
>

--

-- 
Lorenz Mösenlechner            | moesenle@...
Technische Universität München | Karlstraße 45
80335 München                  | Germany
http://ias.cs.tum.edu/         | Tel: +49 (89) 289-26910
Jack O'Quin | 8 Aug 2012 19:52
Picon
Gravatar

Re: Replacement of PIP installed tools with apt based installation

On Wed, Aug 8, 2012 at 11:19 AM, Lorenz Mösenlechner
<moesenle@...> wrote:
> Hi Jack,
>
> On my system (Ubuntu Oneiric) it is actually resolved (import
> rosinstall works). As I understand it, debian packages are supposed to
> put their python files in /usr/share/pyshared. See
> http://wiki.debian.org/Python/Policy, in particular:
>
>  /usr/share/pyshared: Every file into this directory is made available
> in /usr/lib/pythonX.Y/site-packages, if the package supports pythonX.Y
> and pythonX.Y is installed on the system. This directory is not
> directly included in sys.path.

Thanks. I was wondering about how that is supposed to work.

On my Oneiric system, /usr/lib/python2.7/site-packages does not exist.
Maybe that's the problem.

There is a /usr/lib/python2.7/dist-packages, but nothing got linked to that.
--

-- 
 joq

Gmane