[SOLVED] mg7.1 - python3 lib have two path

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] mg7.1 - python3 lib have two path

Postby bitit » Nov 28th, '19, 16:33

Good Morning
i'm in testing odoo1 in mageia7.1
but i have the following problem :
from default odoo and python3 packages are be installed in
/usr/lib/pyton3.7/site-pakages

but if i install some add-on by pip3
it will be installed in :
/usr/local/lib/pyton3.7/site-pakages

for this i have done a change in oddo.conf
writing on it the new path for add-on
anyway some add-on don't be loaded by software if i don't copy it in the original folder

is possible have only a folder for all python3 packages?

how?

i have think do copy any file from a folder in the other, deleting the first and linking the second folder in the place of the first.
can be right way?

What the more correct folder to maintain ?

Or maybe i can change where pip3 install the packages?

Enrico
Last edited by bitit on Jan 5th, '20, 15:25, edited 1 time in total.
bitit
 
Posts: 162
Joined: Feb 3rd, '16, 14:01

Re: mg7.1 - python3 lib have two path

Postby doktor5000 » Nov 29th, '19, 12:14

bitit wrote:Or maybe i can change where pip3 install the packages?

Yes that is possible. Check https://stackoverflow.com/questions/291 ... -using-pip
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mg7.1 - python3 lib have two path

Postby bitit » Dec 10th, '19, 19:04

well i have read the document linked ; now i have to much more confusion in my mind ; in the document is wrote a lot of solutions for many version of python ; what i search is a simple configurations file where i write my path destination .
i prefer /usr/lib/python3.7
instead /usr/local/lib/python3.7
bitit
 
Posts: 162
Joined: Feb 3rd, '16, 14:01

Re: mg7.1 - python3 lib have two path

Postby doktor5000 » Dec 11th, '19, 20:24

From what I can tell, you currently could either adjust your odoo configuration to use the paths where you installed packages with pip,
or you can remove the packages you installed with pip and reinstall them to the path where odoo expects them.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18052
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mg7.1 - python3 lib have two path

Postby bitit » Dec 14th, '19, 13:46

isn't possible make a linear installations of italian electronic invoice in odoo11 in this way , how you move you find a error,

root@localhost lib]# pip3 install --target=/usr/lib/python3.7/site-packages/ odoo11-addon-account-fiscal-year
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
TypeError: 'module' object is not callable
[root@localhost lib]# pip3 install --pre odoo11-addon-account-fiscal-year
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
TypeError: 'module' object is not callable
[root@localhost lib]# pip3 install --pre odoo11-addon-account-fiscal-year
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
TypeError: 'module' object is not callable
[root@localhost lib]# pip3 install --target=/usr/lib/python3.7/site-packages/ odoo11-addon-partner-firstname
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
TypeError: 'module' object is not callable
[root@localhost lib]pip install --target=/usr/lib/python3.7/site-packages/ odoo11-addon-partner-firstname
Collecting odoo11-addon-partner-firstname
Downloading https://files.pythonhosted.org/packages ... ne-any.whl (83kB)
|████████████████████████████████| 92kB 770kB/s
ERROR: Could not find a version that satisfies the requirement odoo<11.1dev,>=11.0a (from odoo11-addon-partner-firstname) (from versions: none)
ERROR: No matching distribution found for odoo<11.1dev,>=11.0a (from odoo11-addon-partner-firstname)



the only way is make many tentatives, doing copy the libreries form a side to the other , until casually it work
bitit
 
Posts: 162
Joined: Feb 3rd, '16, 14:01

Re: mg7.1 - python3 lib have two path

Postby bitit » Dec 22nd, '19, 18:35

for installing additional module, at the end i'm back in my first conf
https://forums.mageia.org/en/viewtopic.php?f=7&t=13151

you must change odoo.conf like in the link
for some app, that required particular add on
like for italian electronic invoice , you must copy the folder that pip install'll in /usr/local/lib... in /usr/lib/...
example :
Code: Select all
rpm -e --nodeps python2-yaml
pip install  PyYaml==3.13
pip install  PyXB==1.2.5

copy manually PyYaml , PyXB folders in /usr/bin/pithon3.7/site-packages

in this way seam to work.

but openugrade don't work, a lot of error; so if you have to import the odoo10 archive you must chose other way:
i believe in the future this two paths must be resolved .
enrico
bitit
 
Posts: 162
Joined: Feb 3rd, '16, 14:01

Re: mg7.1 - python3 lib have two path

Postby bitit » Jan 5th, '20, 15:25

i have many test .
pip3 install -t /usr/lib/python3.7/site-packages setuptools

"-t /usr/lib/python3.7/site-packages " work properly for installing in indicated path.

Enrico
bitit
 
Posts: 162
Joined: Feb 3rd, '16, 14:01


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron