astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

Global package installs have odd dependencies #1133

Open dirkpetersen opened 3 months ago

dirkpetersen commented 3 months ago

Steps to Reproduce

or perhaps this is not how it is supposed to work

dp@grammy:~/.rye$ rye install pandas
Resolved 6 packages in 82ms
Installed 6 packages in 29ms
 + numpy==1.26.4
 + pandas==2.2.2
 + python-dateutil==2.9.0.post0
 + pytz==2024.1
 + six==1.16.0
 + tzdata==2024.1
Found additional non installed scripts in dependencies:
numpy:
  - f2py
To install scripts from these packages pass the appropriate --include-dep

warning: installed package did not expose any scripts

does not seem to be there

dp@grammy:~/.rye$ python
Python 3.10.14 (main, Apr 15 2024, 18:28:39) [Clang 17.0.6 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pandas'

or

dp@grammy:~/.rye$ rye install boto3
Resolved 7 packages in 9ms
Installed 7 packages in 71ms
 + boto3==1.34.117
 + botocore==1.34.117
 + jmespath==1.0.1
 + python-dateutil==2.9.0.post0
 + s3transfer==0.10.1
 + six==1.16.0
 + urllib3==2.2.1
Found additional non installed scripts in dependencies:
jmespath:
  - jp.py
To install scripts from these packages pass the appropriate --include-dep

warning: installed package did not expose any scripts
dp@grammy:~/.rye$ python
Python 3.10.14 (main, Apr 15 2024, 18:28:39) [Clang 17.0.6 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'boto3'

Expected Result

install and import works

Actual Result

see above

Version Info

rye 0.34 Python 3.10

Stacktrace

No response

kivo360 commented 3 months ago

It's something I wish he was more clear on too. Each install is packaged separately like pipx. If you install two separate packages they can't talk to each other. It's rather problematic.