# How to upgrade py26-setuptools to py27-setuptools?



## olav (Feb 20, 2011)

I get this error message when I try to install setuptools

```
===>  Checking if devel/py-setuptools already installed
===>   An older version of devel/py-setuptools is already installed (py26-setuptools-0.6c11)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of devel/py-setuptools
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1
```

Deinstalling nor reinstalling doesn't work. Neither the FORCE_PKG_REGISTER variable doesn't work. What can I do to fix this?


----------



## wblock@ (Feb 20, 2011)

What does it show when you deinstall it?
`# cd /usr/ports/devel/py-setuptools && make deinstall`


----------



## olav (Feb 21, 2011)

```
$ cd /usr/ports/devel/py-setuptools && make deinstall
===>  Switching to root credentials for 'deinstall' target
Password:
===>  Deinstalling for devel/py-setuptools
===>  Returning to user credentials
[olav@zpool /usr/ports/devel/py-setuptools]$
```


----------



## wblock@ (Feb 21, 2011)

You should now be able to clean it and install it.  I haven't experimented with the the auto-su stuff, just su to root first:
`% su -`
`# cd /usr/ports/devel/py-setuptools && make clean && make install`


----------



## sk8harddiefast (Feb 21, 2011)

Also Have you set 
	
	



```
FORCE_PKG_REGISTER=YES
```
 in /etc/make.conf?


----------



## wblock@ (Feb 21, 2011)

sk8harddiefast said:
			
		

> Also Have you set
> 
> 
> 
> ...



Please don't do that.  It's an override.  If you ever need it, use it that one time, on the command line.  But it should not be needed here, since the package has been deleted.


----------



## olav (Feb 22, 2011)

wblock said:
			
		

> You should now be able to clean it and install it.  I haven't experimented with the the auto-su stuff, just su to root first:
> `% su -`
> `# cd /usr/ports/devel/py-setuptools && make clean && make install`



And when I do this I get the error message I posted first.


----------



## wblock@ (Feb 22, 2011)

Due to the new version of Python, I guess.  Try force-deleting the old package:

`# pkg_delete -f py26-setuptools-0.6c11`


----------



## olav (Feb 22, 2011)

I added

```
FORCE_PKG_REGISTER=YES
```
to /etc/make.conf

That worked!


----------



## DutchDaemon (Feb 22, 2011)

You should really only use FORCE_PKG_REGISTER as a last resort on the command line (as part of the 'make' command), not in a generic way from /etc/make.conf.

Edit: Oh, I see we've been over this already earlier. So: don't add it to /etc/make.conf. Either set it in the environment when running the 'make' command, or run it as part of the 'make' command, and only when absolutely necessary.


----------



## sk8harddiefast (Feb 22, 2011)

I removed FORCE_PKG_REGISTER from /etc/make.conf


----------

