Python Forum
Call pip3 from python folder build by me call pip3 from the /usr/bin
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call pip3 from python folder build by me call pip3 from the /usr/bin
I have build the latest release of python3 on a Mageia7 system.
Here the configuration command line:
./configure --prefix=${PY_PATH} --enable-shared

And if I call pip3 like that:

${PY_PATH}/bin/pip3 …
${PY_PATH}/bin/python3 pip3 …
${PY_PATH}/bin/python3 ${VENV_PATH}/bin/pip3 …
${PY_PATH}/bin/python3.7 ${VENV_PATH}/bin/pip3.7 …
${PY_PATH}/bin/python3.7m ${VENV_PATH}/bin/pip3.7 …

All this command lines have the same result.
An output example:
Requirement already satisfied, skipping upgrade: apipkg>=1.4 in /usr/local/lib/python3.7/site-packages (from execnet>=1.1->pytest-xdist) (1.5)
Or :
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission non accordée: '/usr/local/bin/f2py' Consider using the `--user` option or check the permissions.
Why ${PY_PATH}/bin/python3 ${VENV_PATH}/bin/pip3 call the pip3 system from /usr/bin?

(Please don't ask me to use a venv, virtualenv or anaconda or wathever... I hate the hasardous behaviour of this things. Angry)

Response: don't build python with the shared option.

It's works. I don't khow why.
The problem is not from where pip starts, you do not have write permission for /usr/local/lib/python3.7/site-packages as a user.

So you have to use sudo or 'pip install --user packagename'

I haven't build and install python in the files system but in a /home/username/Python folder.
The building otpion --enable-shared cause this error. Without this option it's work.
If you need to activate the --enable-shared the answer is:
./configure --prefix=${PY_PATH} --enable-shared LDFLAGS=-Wl,-rpath=${PY_PATH}/lib --enable-optimizations # --enable-optimizations is optional
make -j 16
make altinstall
If you have this error:
./python: symbol lookup error: ./python: undefined symbol: __gcov_indirect_call
Delete ${PY_PATH} folder befor to call configure.


To use waf i need do define some symbolic link:
ln -sf ${PY_PATH}/bin/python3.7m ${PY_PATH}/bin/python3
ln -sf ${PY_PATH}/bin/pip3.7 ${PY_PATH}/bin/pip3
ln -sf ${PY_PATH}/bin/pip3.7 ${PY_PATH}/bin/pip
ln -sf ${PY_PATH}/bin/python3.7m-config ${PY_PATH}/python3.7-config
ln -sf ${PY_PATH}/bin/python3.7m-config ${PY_PATH}/bin/python3-config

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to call an object in another function in Maya bstout 0 82 Apr-05-2021, 07:12 PM
Last Post: bstout
  AttributeError Traceback (most recent call last) quest 5 260 Mar-31-2021, 01:34 PM
Last Post: quest
  Move file from one folder to another folder with timestamp added end of file shantanu97 0 134 Mar-22-2021, 10:59 AM
Last Post: shantanu97
  Values not updating for restful call boomramada 0 218 Mar-13-2021, 01:08 PM
Last Post: boomramada
  How to link Sublime Text 3 Build system to Python 3.9 Using Windows 10 Fanman001 2 906 Mar-04-2021, 03:09 PM
Last Post: martpogs
  How to call multiple functions sequentially Mayo 2 294 Jan-06-2021, 07:37 PM
Last Post: Mayo
  In this function y initially has no value, but a call to foo() gives no error. Why? Pedroski55 8 492 Dec-19-2020, 07:30 AM
Last Post: ndc85430
  how do i store then call a mp3 from sqlite3 .db file gr3yali3n 3 432 Dec-11-2020, 10:28 AM
Last Post: snippsat
  How to create a linked list and call it? loves 12 681 Nov-22-2020, 03:50 PM
Last Post: loves
  to call via console a python-programm Liki 9 548 Nov-22-2020, 01:10 AM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020