then create a fresh venv anywhere in your home directory and activate it:
python3 -m venv test
source test/bin/activate
and try to recursively install the previously created reqs:
pip3 install -r requirements.txt
You will get the following error:
Collecting bfast from git+git://github.com/diku-dk/bfast.git@develop#egg=bfast (from -r ../license.txt (line 1))
Cloning git://github.com/diku-dk/bfast.git (to develop) to /tmp/pip-build-7v8ihvfi/bfast
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-7v8ihvfi/bfast/setup.py", line 16, in
import bfast
File "/tmp/pip-build-7v8ihvfi/bfast/bfast/init.py", line 1, in
from .models import BFASTMonitor
File "/tmp/pip-build-7v8ihvfi/bfast/bfast/models.py", line 1, in
from bfast.monitor import BFASTMonitorPython
File "/tmp/pip-build-7v8ihvfi/bfast/bfast/monitor/init.py", line 1, in
from .opencl import BFASTMonitorOpenCL
File "/tmp/pip-build-7v8ihvfi/bfast/bfast/monitor/opencl/init.py", line 1, in
from .base import BFASTMonitorOpenCL
File "/tmp/pip-build-7v8ihvfi/bfast/bfast/monitor/opencl/base.py", line 11, in
import pandas
ModuleNotFoundError: No module named 'pandas'
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7v8ihvfi/bfast/
problem
The issue comes from the __init__.py file of bfast.
In setup.py you import bfast to retrieve the version number. This action is not possible if the other libs are not yet installed because there is an import of bfastMonitor in the __init__.py file.It's the case if you use a -r installation process (pip install them all at once and not one after another).
I would suggest to code the version number in a separated file if you really want to import it or to hard code it in the setup.py file
issue
I wanted to use the specific
develop
branch in my requirement file as it's currently the most advanced one but it cannot be installed this way.Reproductible example:
create a
requirements.txt
file containing the following:then create a fresh venv anywhere in your home directory and activate it:
and try to recursively install the previously created reqs:
You will get the following error:
problem
The issue comes from the
__init__.py
file of bfast. Insetup.py
you importbfast
to retrieve the version number. This action is not possible if the other libs are not yet installed because there is an import ofbfastMonitor
in the__init__.py
file.It's the case if you use a-r
installation process (pip install them all at once and not one after another).I would suggest to code the version number in a separated file if you really want to import it or to hard code it in the
setup.py
file