Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder? [RSS Feed]

#1 June 8, 2010 10:25:57

N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


Hi,

I'm currently running Django on CentOS using the supplied Python 2.4.
I now need to use Python 2.6. I have installed Python 2.6 from the
EPEL repositories, which sits alongside 2.4 (which is required for
CentOS things such as "yum").

Django (and other Python modules) are all located in Python 2.4's site-
packages folder. When I upgrade to 2.6, is it just a case of copying
these over into 2.6's site-packages folder, or do I need to install
the modules afresh?

Thanks,
Nick

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 June 8, 2010 14:05:10

b.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


I haven't tried it. But, I wouldn't think so. It shouldn't be hard
to install Django for 2.6. I've never used CentOS. But, most of the
time, a version requirement means "at least". Of course, in the case
of Python 3, that would not be true.

On Tue, Jun 8, 2010 at 4:25 AM, Nick <n...@njday.com> wrote:
> Hi,
>
> I'm currently running Django on CentOS using the supplied Python 2.4.
> I now need to use Python 2.6.  I have installed Python 2.6 from the
> EPEL repositories, which sits alongside 2.4 (which is required for
> CentOS things such as "yum").
>
> Django (and other Python modules) are all located in Python 2.4's site-
> packages folder.  When I upgrade to 2.6, is it just a case of copying
> these over into 2.6's site-packages folder, or do I need to install
> the modules afresh?
>
> Thanks,
> Nick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 June 8, 2010 15:32:31

Alex R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


You don't want to just copy site-packages. If you have any compiled
modules (pyyaml, PIL, etc) they won't work, since they were compiled
for the old version of python.

Alex

On Jun 8, 4:25 am, Nick <n...@njday.com> wrote:
> Hi,
>
> I'm currently running Django on CentOS using the supplied Python 2.4.
> I now need to use Python 2.6.  I have installed Python 2.6 from the
> EPEL repositories, which sits alongside 2.4 (which is required for
> CentOS things such as "yum").
>
> Django (and other Python modules) are all located in Python 2.4's site-
> packages folder.  When I upgrade to 2.6, is it just a case of copying
> these over into 2.6's site-packages folder, or do I need to install
> the modules afresh?
>
> Thanks,
> Nick

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 June 8, 2010 15:50:44

Bill F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


Additionally, the .pyc files are version specific. IF you had no specific
incompatibilities, you could consider deleting all .pyc files in the copy,
then import every .py file running as root, to make new .pyc files.

But then there are likely to be plenty of other issues anyway, as Alex
points out.

This is all much more work than just installing stuff fresh, in these bold
new days of distribute and pip install.

Bill

On Tue, Jun 8, 2010 at 10:32 AM, Alex Robbins
<alexander.j.robb...@gmail.com> wrote:
> You don't want to just copy site-packages. If you have any compiled
> modules (pyyaml, PIL, etc) they won't work, since they were compiled
> for the old version of python.
>
> Alex
>
> On Jun 8, 4:25 am, Nick <n...@njday.com> wrote:
>> Hi,
>>
>> I'm currently running Django on CentOS using the supplied Python 2.4.
>> I now need to use Python 2.6.  I have installed Python 2.6 from the
>> EPEL repositories, which sits alongside 2.4 (which is required for
>> CentOS things such as "yum").
>>
>> Django (and other Python modules) are all located in Python 2.4's site-
>> packages folder.  When I upgrade to 2.6, is it just a case of copying
>> these over into 2.6's site-packages folder, or do I need to install
>> the modules afresh?
>>
>> Thanks,
>> Nick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 June 8, 2010 16:14:54

Alex R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


you could do a pip freeze in your old install, then do a pip install
-r requirements in the new one. That would probably catch most things.

Alex

On Tue, Jun 8, 2010 at 9:50 AM, Bill Freeman <ke1g...@gmail.com> wrote:
> Additionally, the .pyc files are version specific. IF you had no specific
> incompatibilities, you could consider deleting all .pyc files in the copy,
> then import every .py file running as root, to make new .pyc files.
>
> But then there are likely to be plenty of other issues anyway, as Alex
> points out.
>
> This is all much more work than just installing stuff fresh, in these bold
> new days of distribute and pip install.
>
> Bill
>
> On Tue, Jun 8, 2010 at 10:32 AM, Alex Robbins
> <alexander.j.robb...@gmail.com> wrote:
>> You don't want to just copy site-packages. If you have any compiled
>> modules (pyyaml, PIL, etc) they won't work, since they were compiled
>> for the old version of python.
>>
>> Alex
>>
>> On Jun 8, 4:25 am, Nick <n...@njday.com> wrote:
>>> Hi,
>>>
>>> I'm currently running Django on CentOS using the supplied Python 2.4.
>>> I now need to use Python 2.6.  I have installed Python 2.6 from the
>>> EPEL repositories, which sits alongside 2.4 (which is required for
>>> CentOS things such as "yum").
>>>
>>> Django (and other Python modules) are all located in Python 2.4's site-
>>> packages folder.  When I upgrade to 2.6, is it just a case of copying
>>> these over into 2.6's site-packages folder, or do I need to install
>>> the modules afresh?
>>>
>>> Thanks,
>>> Nick
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 June 14, 2010 09:23:14

N.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder?


Many thanks for your helpful posts - in the end I just changed a bit
of my code to work with 2.4, but this will come in handy for when I
finally make the upgrade.

Thanks again,
Nick

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Upgrading Python from 2.4 to 2.6 - can I just copy site-packages folder? [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support