Moving can go bad,as OS environment Python version ect... can be different.
The
The fix or how meant to be should be used is run
In the big picture so is venv a dependency management tool,like also pipenv is.
A level above setuptools(
So a wheel contain everything dependencies,python files,can also have C binray/dependencies.
Can be moved around and installed with
So PyPi is really a online a distribution of wheels(as wheel is what you upload to PyPi).
Poetry try to make this easier at higher level also it replace setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile.
To one file
Poetry dos a good job trying to make this simpler.
In the picture is also Anaconda with there tool like pip which is conda.
So eg Miniconda is standalone and can be moved around.
So a little overview on this topic that's not so easy,but is better than it used to be
The
relocatable
option is deprecated and generally fails to solve the problem. The fix or how meant to be should be used is run
pip freeze > requirements.txt
and recreate on new system with pip install -r requirements.txt
.$ oldenv/bin/pip freeze > requirements.txt $ python -m venv newenv $ newenv/bin/pip install -r requirements.txtSo can just keep
requirements.txt
for your virtual environments and recreate on new system.In the big picture so is venv a dependency management tool,like also pipenv is.
A level above setuptools(
setup.py
) to create wheels.So a wheel contain everything dependencies,python files,can also have C binray/dependencies.
Can be moved around and installed with
pip install my_wheel.whl
So PyPi is really a online a distribution of wheels(as wheel is what you upload to PyPi).
Poetry try to make this easier at higher level also it replace setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile.
To one file
pyproject.toml
Poetry dos a good job trying to make this simpler.
In the picture is also Anaconda with there tool like pip which is conda.
So eg Miniconda is standalone and can be moved around.
So a little overview on this topic that's not so easy,but is better than it used to be