[Distutils] Transfering modules

Ian Hartley iahartle at ucsd.edu
Fri Aug 18 14:39:24 EDT 2017


Thanks all,

I was able to copy the files from the site-packages, and transfer to
3.6.2.  For some reason, even though I've transfered all the modules, only
some are appearing.  Very strange.  Either way I think it should work for
now...

Let me know if you know why only some of the packages would be showing up.

Thanks for all your help.

Best,
Ian

On Fri, Aug 18, 2017 at 4:57 AM, Wayne Werner <waynejwerner at gmail.com>
wrote:

> You could potentially also run `/path/to/python3.6.2/bin/python3 -m pip
> install $(/path/to/python3.6.1/bin/python3 -m pip freeze)`, naturally
> replacing path with the correct path. pip freeze lists the versions of
> things you have installed.
>
> HTH,
> Wayne
>
> On Fri, Aug 18, 2017, 3:03 AM Nick Coghlan <ncoghlan at gmail.com> wrote:
>
>> On 18 August 2017 at 12:17, Ian Hartley <iahartle at ucsd.edu> wrote:
>> > Hello,
>> >
>> > I have a question that I haven't been able to find online or in the
>> python
>> > documentation.
>> > While trying to install a module I have encountered significant trouble,
>> > stalling my current experiment.
>> >
>> > I recently installed python 3.6.2, and I want to know how to transfer
>> the
>> > numerous modules I have on 3.6.1 to the newest version, usable by an
>> > interpreter.
>>
>> Without knowing more about your system (operating system, where you
>> installed Python from, how you're installing Python dependencies),
>> it's hard to say what might be going wrong, since most mechanisms for
>> upgrading Python will treat 3.6.2 as a direct replacement for 3.6.1,
>> and hence you shouldn't have to do anything at all to start using
>> Python 3.6.2 instead (since they're part of the same feature release
>> stream, they'll both use `3.6` to qualify the directories they access,
>> and hence should be able to see the same set of importable modules).
>>
>> However, from your comments, it sounds like you managed to do a
>> parallel install instead, in which case the answers would be:
>>
>> 1. Don't do that, as you'll make life more difficult for yourself by
>> defeating the main point of offering in-place maintenance updates
>> 2. If you really need to do it, *and* you're using a virtual
>> environment to manage your dependencies, then you can technically
>> change which Python an existing virtual environment is using by
>> fiddling with the symlinks (but I wouldn't recommend it)
>> 3. If you're *not* using a virtual environment to manage your
>> dependencies, then running `python3 -m site` with each version will
>> tell you where their respective site-packages are, so you can copy all
>> the files from your 3.6.1 installation to your new 3.6.2 installation
>> (although again, I wouldn't really recommend it)
>>
>> The ideal case would be having all your dependencies listed in a
>> requirements.txt file, so setting up a new virtual environment would
>> just be a matter of activating it and then running "pip install -r
>> requirements.txt". (Or, equivalently, define a conda environment file
>> and set up your experimental system with "conda env create":
>> https://conda.io/docs/using/envs.html#create-environment-file-by-hand)
>>
>> Cheers,
>> Nick.
>>
>> --
>> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
>> _______________________________________________
>> Distutils-SIG maillist  -  Distutils-SIG at python.org
>> https://mail.python.org/mailman/listinfo/distutils-sig
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170818/08b75dc9/attachment-0001.html>


More information about the Distutils-SIG mailing list