Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue installing date_range from pip #7

Closed
JordiBForgeFlow opened this issue Feb 15, 2018 · 11 comments
Closed

Issue installing date_range from pip #7

JordiBForgeFlow opened this issue Feb 15, 2018 · 11 comments

Comments

@JordiBForgeFlow
Copy link
Member

I am facing an error when trying to install the module 'date_range' in v11 from pip. See below:

pip install -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt
Collecting odoo11-addon-date-range==11.0.1.0.0.99.dev3 (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))
  Using cached odoo11_addon_date_range-11.0.1.0.0.99.dev3-py2.py3-none-any.whl
Collecting odoo11-addon-base-technical-features (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 4))
  Using cached odoo11_addon_base_technical_features-11.0.1.0.0.99.dev1-py2.py3-none-any.whl
Obtaining odoo11_addon_auditlog from git+https://github.com/OCA/server-tools.git@11.0#egg=odoo11_addon_auditlog&subdirectory=setup/auditlog (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 6))
  Updating ./src/odoo11-addon-auditlog clone (to 11.0)
Obtaining odoo11_addon_mis_builder from git+https://github.com/OCA/mis-builder.git@11.0#egg=odoo11_addon_mis_builder&subdirectory=setup/mis_builder (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 9))
  Updating ./src/odoo11-addon-mis-builder clone (to 11.0)
Obtaining odoo11_addon_mis_builder_budget from git+https://github.com/OCA/mis-builder.git@11.0#egg=odoo11_addon_mis_builder_budget&subdirectory=setup/mis_builder_budget (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 10))
  Updating ./src/odoo11-addon-mis-builder-budget clone (to 11.0)
Obtaining odoo11_addon_mis_builder_demo from git+https://github.com/OCA/mis-builder.git@11.0#egg=odoo11_addon_mis_builder_demo&subdirectory=setup/mis_builder_demo (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 11))
  Updating ./src/odoo11-addon-mis-builder-demo clone (to 11.0)
Obtaining odoo11_addon_web_responsive from git+https://github.com/OCA/web.git@11.0#egg=odoo11_addon_web_responsive&subdirectory=setup/web_responsive (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 14))
  Updating ./src/odoo11-addon-web-responsive clone (to 11.0)
Obtaining odoo11_addon_web_environment_ribbon from git+https://github.com/OCA/web.git@11.0#egg=odoo11_addon_web_environment_ribbon&subdirectory=setup/web_environment_ribbon (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 15))
  Updating ./src/odoo11-addon-web-environment-ribbon clone (to 11.0)
Obtaining odoo11_addon_web_sheet_full_width from git+https://github.com/OCA/web.git@11.0#egg=odoo11_addon_web_sheet_full_width&subdirectory=setup/web_sheet_full_width (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 16))
  Updating ./src/odoo11-addon-web-sheet-full-width clone (to 11.0)
Obtaining odoo11_addon_account_financial_report from git+https://github.com/OCA/account-financial-reporting.git@11.0#egg=odoo11_addon_account_financial_report&subdirectory=setup/account_financial_report (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 19))
  Updating ./src/odoo11-addon-account-financial-report clone (to 11.0)
Obtaining odoo11_addon_account_tax_balance from git+https://github.com/OCA/account-financial-reporting.git@11.0#egg=odoo11_addon_account_tax_balance&subdirectory=setup/account_tax_balance (from -r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 20))
  Updating ./src/odoo11-addon-account-tax-balance clone (to 11.0)
Collecting odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))
  Could not find a version that satisfies the requirement odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3)) (from versions: )
No matching distribution found for odoo<11.1dev,>=11.0a (from odoo11-addon-date-range==11.0.1.0.0.99.dev3->-r https://raw.githubusercontent.com/Eficent/sample-oca-pip-requirements/11.0/requirements.txt (line 3))

@sbidoul do you think that this may be related to the date_range module, or some other package, such as setuptools?

@sbidoul
Copy link
Member

sbidoul commented Feb 15, 2018

The error is actually No matching distribution found for odoo<11.1dev,>=11.0a, so you need to pip install or setup.py develop odoo first.

@JordiBForgeFlow
Copy link
Member Author

Ohh, of course!

@SalahAdDin
Copy link

If you try to install it(update) inside a Docker container we have the next problem:

odoo@8112e474d490:/$ pip3 install -U odoo
Collecting odoo
  Could not find a version that satisfies the requirement odoo (from versions: )
No matching distribution found for odoo

@sbidoul
Copy link
Member

sbidoul commented Jun 8, 2018 via email

@SalahAdDin
Copy link

SalahAdDin commented Jun 8, 2018

@sbidoul Yes, it is.

docker exec -it odoo.web bash                                                   ✔  3656  15:44:56 
odoo@8112e474d490:/$ pip3 freeze | grep odoo
odoo==11.0.post20180122
odoo@8112e474d490:/$ 

@sbidoul
Copy link
Member

sbidoul commented Jun 17, 2018

@SalahAdDin

I'm not sure exactly why this happens, but the problem is related to odoo being installed system wide and pip3 running under the odoo user not "seeing" it as installed. This looks like a pip bug to me but I'm not sure.

Anyway, you can make it work by running pip3 install as root, with such a docker image:

FROM odoo:11
USER 0
RUN apt-get update && apt-get install python3-pyldap python3-vobject python3-qrcode
RUN pip3 install --pre odoo11-addon-date_range
USER odoo

Note the apt install of some required Odoo dependencies that are missing in the official docker image.

@SalahAdDin
Copy link

Thank you, I will test it

@angerangel
Copy link

Same problem:

pip3 list | grep odoo

odoo (12.0.post20190514)
odoo-autodiscover (2.0.0)
setuptools-odoo (2.4.1)

Could not find a version that satisfies the requirement odoo<12.1dev,>=12.0a

@darr1s
Copy link

darr1s commented May 26, 2019

Any updates?

@sbidoul
Copy link
Member

sbidoul commented May 27, 2019

There were improvements in upstream Odoo regarding this issue. If this is still a problem, can you please open a new issue with detailed instruction on how to reproduce at https://github.com/acsone/setuptools-odoo?

@aturing
Copy link

aturing commented Jul 16, 2019

Same problem here with the official odoo docker image. Following @sbidoul instructions, I install pip packages as root with the following command and it works:

docker exec -it --user="root" <container_id> pip3 install <package>

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants