Giter Site home page Giter Site logo

Comments (7)

i-chvets avatar i-chvets commented on August 15, 2024 1

Debugging.

Experimentation involved two Ubuntu VMs.

On Ubuntu 22.04:

$ mkdir test
$ ls -la test
drwxrwxr-x 2 4096 Sep  6 14:09 .
drwxrwxr-x 9 4096 Sep  6 14:09 ..
$ pip --version
pip 22.3.1
$ pip install --prefix ./test/ ./chardet-3.0.4-py2.py3-none-any.whl 
Processing ./chardet-3.0.4-py2.py3-none-any.whl
Installing collected packages: chardet
Successfully installed chardet-3.0.4
$ ls -la test/
drwxrwxr-x 3 4096 Sep  6 14:10 .
drwxrwxr-x 9 4096 Sep  6 14:09 ..
drwxrwxr-x 4 4096 Sep  6 14:10 local
$ ls -la test/local/
drwxrwxr-x 4 4096 Sep  6 14:10 .
drwxrwxr-x 3 4096 Sep  6 14:10 ..
drwxrwxr-x 2 4096 Sep  6 14:10 bin
drwxrwxr-x 3 4096 Sep  6 14:10 lib

local/ directory is created under test/ (which was supplied via --prefix) in which bin/, lib/, etc. are installed. It seems that in pip 22.3.1 --prefix option is not handled as described in documentation:

On Ubuntu 20.04:

$ mkdir test
$ ls -la test
drwxrwxr-x 2 4096 Sep  6 14:09 .
drwxrwxr-x 9 4096 Sep  6 14:09 ..
$ pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ ls -la test/
total 16
drwxrwxr-x 1 4096 Sep  6 14:28 .
drwxrwxr-x 1 4096 Sep  6 14:28 ..
drwxrwxr-x 1 4096 Sep  6 14:28 bin
drwxrwxr-x 1 4096 Sep  6 14:28 lib

bin/ and lib/ created directly under test/, no extra directory was created, i.e. no local/ under test/
This behaviour is aligned with pip documentation on handling of --prefix option.

Another small test on 22.04:

$ python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pip._internal.locations import _distutils, _sysconfig
>>> _sysconfig.get_scheme('click', prefix='myprefix').purelib
'myprefix/local/lib/python3.10/dist-packages'
>>> _distutils.get_scheme('click', prefix='myprefix').purelib
'myprefix/lib/python3.10/site-packages'

Related issues:
pypa/pip#10978

from seldonio-rocks.

SamirPS avatar SamirPS commented on August 15, 2024

Do you know the version of pip on the log?

from seldonio-rocks.

orfeas-k avatar orfeas-k commented on August 15, 2024

Keeping it open until there is a fix for the pip issue.

from seldonio-rocks.

orfeas-k avatar orfeas-k commented on August 15, 2024

Closing since it looks like they can be built now, if we add a python-is-python3 package (although unrelated to this issue)

from seldonio-rocks.

orfeas-k avatar orfeas-k commented on August 15, 2024

Reopening since the previous comment wasn't exactly true. They could be built because we were using base: [email protected] instead of 22.04 as suggested by this issue.

from seldonio-rocks.

syncronize-issues-to-jira avatar syncronize-issues-to-jira commented on August 15, 2024

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/KF-5141.

This message was autogenerated

from seldonio-rocks.

orfeas-k avatar orfeas-k commented on August 15, 2024

Closed in #73, #69, #72 and #66.

from seldonio-rocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.