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

ipython cannot find pythonrc.py #24290

Closed
jvacek opened this issue Oct 11, 2024 · 7 comments
Closed

ipython cannot find pythonrc.py #24290

jvacek opened this issue Oct 11, 2024 · 7 comments
Assignees
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@jvacek
Copy link

jvacek commented Oct 11, 2024

Type: Bug

Behaviour

When I run iPython, I get this output

Python 3.10.3 (main, Jul 25 2023, 14:36:20) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.28.0 -- An enhanced Interactive Python. Type '?' for help.
[TerminalIPythonApp] WARNING | File not found: '/Users/jvacek/.vscode/extensions/ms-python.python-2024.14.1-darwin-arm64/python_files/pythonrc.py'

Steps to reproduce:

  • open terminal
  • (auto)activate venv
  • run ipython

Might be worth noting I am using a custom VSCode profile that's separate from my default?

Python 3.10.3, with the following pip freeze

aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
amqp==5.2.0
annotated-types==0.7.0
arrow==1.3.0
asgiref==3.8.1
asttokens==2.4.1
async-timeout==4.0.3
attrs==24.2.0
bcrypt==4.2.0
billiard==4.2.0
blinker==1.8.2
build==1.2.1
ca-integrations==9.43.2
CacheControl==0.14.0
cachetools==5.5.0
cattrs==24.1.0
ccy==1.4.1
celery==5.4.0
celery-types==0.22.0
certifi==2024.8.30
cffi==1.17.0
charset-normalizer==3.3.2
click==8.1.7
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
coreapi==2.3.3
coreschema==0.0.4
coverage==7.6.1
cryptography==43.0.0
dacite==1.8.1
db-dtypes==1.3.0
ddt==1.7.2
debugpy==1.8.5
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.14
Django==4.2.16
django-admin-lightweight-date-hierarchy==1.3.0
django-ajax-selects==2.2.1
django-appconf==1.0.6
django-axes==6.5.1
django-celery-results==2.5.1
django-cors-headers==4.4.0
django-debug-toolbar==4.4.6
django-dirtyfields==1.9.3
django-elasticsearch-dsl==7.4
django-extensions==3.2.3
django-jsonforms==1.1.2
django-migrations-ci-lh==0.0.2
django-mysql==4.14.0
django-oauth-toolkit==1.7.1
django-pydantic-field==0.3.10
django-query-limiter==0.2.0
django-ratelimit==4.1.0
django-safemigrate==4.3
django-select2==8.2.1
django-slowtests==1.1.1
django-suit @ https://github.com/mhindery/django-suit/archive/9b9f9793b974b4032e96f291c527c6df20a28344.tar.gz#sha256=fec5cbdafa6d148f37b32c4c750e0d94d9d9c280c0bc125016f5d584f94d3d88
django-types==0.19.1
django-widget-tweaks==1.5.0
django_csp==3.8
djangorestframework==3.15.2
djangosaml2==1.9.3
djangosaml2idp==0.7.2
djmail==2.0.0
drf-spectacular==0.27.2
elasticsearch==7.17.9
elasticsearch-dsl==7.4.1
elementpath==4.4.0
exceptiongroup==1.2.2
execnet==2.1.1
executing==2.1.0
factory_boy==3.3.1
Faker==28.1.0
fastavro==1.9.7
firebase-admin==6.5.0
freezegun==1.5.1
frozenlist==1.4.1
geographiclib==2.0
geopy==2.4.1
gitdb==4.0.11
GitPython==3.1.43
google-api-core==2.19.2
google-api-python-client==2.143.0
google-auth==2.34.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.1
google-cloud-bigquery==3.25.0
google-cloud-bigquery-storage==2.25.0
google-cloud-bigtable==2.26.0
google-cloud-core==2.4.1
google-cloud-firestore==2.18.0
google-cloud-kms==2.24.2
google-cloud-monitoring==2.22.2
google-cloud-pubsub==2.23.0
google-cloud-recaptcha-enterprise==1.22.0
google-cloud-spanner==3.48.0
google-cloud-sqlcommenter==2.0.0
google-cloud-storage==2.18.2
google-crc32c==1.6.0
google-resumable-media==2.7.2
googleapis-common-protos==1.65.0
grpc-google-iam-v1==0.13.1
grpc-interceptor==0.15.4
grpcio==1.66.1
grpcio-status==1.62.3
gunicorn==23.0.0
h3==3.7.7
httplib2==0.22.0
humanize==4.10.0
icdiff==2.0.7
idna==3.8
importlib-metadata==7.0.0
inflection==0.5.1
iniconfig==2.0.0
ipython==8.28.0
isodate==0.6.1
itypes==1.2.0
jedi==0.19.1
Jinja2==3.1.4
jira==3.5.0
jsonschema==4.23.0
jsonschema-path==0.3.3
jsonschema-specifications==2023.12.1
jwcrypto==1.5.6
kombu==5.4.0
lazy-object-proxy==1.10.0
looker-sdk==24.14.0
lxml==5.3.0
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib-inline==0.1.7
mdurl==0.1.2
more-itertools==10.4.0
msgpack==1.0.8
multidict==6.0.5
mysqlclient==2.2.4
nodeenv==1.9.1
nplusone @ https://github.com/DavidMikeSimon/nplusone/archive/303f989ea85d0e119fafd065df2fcb831adba1b9.zip#sha256=6254bed1f3fe067ba66a7436383cb9c949bce0ca605563fbcf6f4ca0ca7a4a61
numpy==1.23.1
oauthlib==3.2.2openapi-core==0.19.1
openapi-schema-validator==0.6.2
openapi-spec-validator==0.7.1
opentelemetry-api==1.24.0
opentelemetry-exporter-otlp-proto-common==1.24.0
opentelemetry-exporter-otlp-proto-grpc==1.24.0
opentelemetry-instrumentation==0.45b0
opentelemetry-instrumentation-requests==0.45b0
opentelemetry-proto==1.24.0
opentelemetry-sdk==1.24.0
opentelemetry-semantic-conventions==0.45b0
opentelemetry-util-http==0.45b0
orjson==3.10.7
packaging==24.1
pandas==1.5.3
parameterized==0.9.0
paramiko==3.4.1
parse==1.20.2
parso==0.8.4
pathable==0.4.3
pexpect==4.9.0
pip-tools==7.4.1
pluggy==1.5.0
pprintpp==0.4.0
prompt_toolkit==3.0.47
proto-plus==1.24.0
protobuf==4.25.4
psutil==5.9.8
psycopg2-binary==2.9.9
ptyprocess==0.7.0
pure_eval==0.2.3
pyarrow==17.0.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycountry==23.12.11
pycparser==2.22
pydantic==2.8.2
pydantic-xml==2.12.1
pydantic_core==2.20.1
Pygments==2.18.0
pygsheets==2.0.5
PyJWT==2.9.0
PyNaCl==1.5.0
pyOpenSSL==24.2.1
pyotp==2.9.0
pyparsing==3.1.4
pyproject_hooks==1.1.0
pyright==1.1.378
pysaml2==7.5.0
pysftp==0.2.9
pytest==8.3.2
pytest-cov==5.0.0
pytest-django==4.9.0
pytest-env==1.1.3
pytest-icdiff==0.9
pytest-random-order==1.1.1
pytest-subtests==0.13.1
pytest-sugar==1.0.0
pytest-xdist==3.6.1
python-dateutil==2.9.0.post0
pytz==2024.1
PyYAML==6.0.2
rapidfuzz==3.9.7
redis==5.0.8
referencing==0.35.1
requests==2.32.3
requests-oauthlib==2.0.0
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rich==13.8.0
rpds-py==0.20.0
rsa==4.9
ruff==0.6.5
sentry-sdk==1.45.1
shapely==2.0.6
six==1.16.0
smmap==5.0.1
sqlparse==0.5.1
stack-data==0.6.3
StrEnum==0.4.15
structlog==24.4.0
structlog-sentry==2.1.0
tabulate==0.9.0
tenacity==8.5.0
termcolor==2.4.0
thefuzz==0.22.1
timezonefinder==6.5.2
tomli==2.0.1
tqdm==4.66.5
traitlets==5.14.3
types-psycopg2==2.9.21.20240819
types-python-dateutil==2.9.0.20240821
typing_extensions==4.12.2
tzdata==2024.1
unittest-xml-reporting==3.2.0
uritemplate==4.1.1
urllib3==1.26.20
vine==5.1.0
wcwidth==0.2.13
Werkzeug==3.0.4
wrapt==1.16.0
xmlschema==2.5.1
xmltodict==0.13.0
yarl==1.9.7
zipp==3.20.1
zstandard==0.23.0
ZuoraApi==1.3

Diagnostic data

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2024.16.1
VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Darwin arm64 24.0.0
Modes:

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.3
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Pyenv
  • Value of the python.languageServer setting: Pylance
User Settings


envFile: "<placeholder>"

languageServer: "Pylance"

testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true

Installed Extensions
Extension Name Extension Id Version
autoDocstring - Python Docstring Generator njpwerner.autodocstring 0.6.1
Autoflake - Remove unused Python imports TrungNgo.autoflake 0.0.3
Automatic Editor Sorter zokugun.automatic-editor-sorter 0.1.0
Bash IDE mads-hartmann.bash-ide-vscode 1.43.0
Black Formatter ms-python.black-formatter 2024.4.0
Code Spell Checker streetsidesoftware.code-spell-checker 3.0.1
Django batisteo.vscode-django 1.15.0
djLint monosans.djlint 2024.7.0
EditorConfig for VS Code EditorConfig.EditorConfig 0.16.4
Error Lens usernamehw.errorlens 3.20.0
Even Better TOML tamasfe.even-better-toml 0.19.2
Flake8 ms-python.flake8 2023.10.0
Gemini Code Assist + Google Cloud Code googlecloudtools.cloudcode 2.18.2
GitHub Copilot GitHub.copilot 1.238.0
GitHub Copilot Chat GitHub.copilot-chat 0.21.1
GitLab Workflow GitLab.gitlab-workflow 5.15.0
GitLens — Git supercharged eamodio.gitlens 15.6.0
HashiCorp HCL hashicorp.hcl 0.5.0
HashiCorp Terraform hashicorp.terraform 2.32.3
Increment Selection albymor.increment-selection 0.2.0
IntelliCode VisualStudioExptTeam.vscodeintellicode 1.3.1
isort ms-python.isort 2023.10.1
JavaScript Debugger ms-vscode.js-debug 1.94.0
JavaScript Debugger Companion Extension ms-vscode.js-debug-companion 1.1.3
Jira and Bitbucket (Atlassian Labs) atlassian.atlascode 3.0.10
markdownlint DavidAnson.vscode-markdownlint 0.56.0
Multiple cursor case preserve Cardinal90.multi-cursor-case-preserve 1.0.5
Peacock johnpapa.vscode-peacock 4.2.2
Pylance ms-python.vscode-pylance 2024.10.1
Python ms-python.python 2024.16.1
Python Debugger ms-python.debugpy 2024.10.0
Python Indent KevinRose.vsc-python-indent 1.18.0
Rainbow CSV mechatroner.rainbow-csv 3.12.0
shell-format foxundermoon.shell-format 7.2.5
shellman Remisa.shellman 5.7.0
SQLTools mtxr.sqltools 0.28.3
Table Visualizer for JavaScript Profiles ms-vscode.vscode-js-profile-table 1.0.10
TabOut albert.TabOut 0.2.2
YAML redhat.vscode-yaml 1.15.0
YAML Sort PascalReitermann93.vscode-yaml-sort 6.5.17
System Info
Item Value
CPUs Apple M2 Pro (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 3, 3
Memory (System) 16.00GB (0.08GB free)
Process Argv --crash-reporter-id 40e3f71a-08a9-4079-80f2-c2e9763a3415
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
jg8ic977:31013176
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31102340
nativerepl2:31139839
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-t:31132770
wkspc-ranged-t:31151552
cf971741:31144450
defaultse:31146405
iacca2:31150323
notype1cf:31151524
5fd0e150:31155592

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 11, 2024
@karthiknadig
Copy link
Member

@jvacek Can you try python extension version 2024.16.1, you might need the latest vscode version v1.94.*

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 11, 2024
@anthonykim1
Copy link

Image
@jvacek Thanks for filing this. Can you also try turning off this shell integration setting and see if that resolves the problem?

@jvacek
Copy link
Author

jvacek commented Oct 17, 2024

Looks like it's resolved! Didn't have to remove the shell integration settings either

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 17, 2024
@jvacek
Copy link
Author

jvacek commented Oct 23, 2024

Looks like this has become an issue again, with and without the shell integration setting enabled.

Even with the 2024.16.1, the path there still refers to 2024.14.1.

@anthonykim1
Copy link

anthonykim1 commented Oct 23, 2024

@jvacek Can you try killing the current terminal and restarting your terminal instance? (Try with with and without the above shell integration setting) and then run Python: Clear Cache and reload
Also wondering what happens if you launch non-IPython REPL such as via typing python or python3
Thanks again!

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Oct 23, 2024
@jvacek
Copy link
Author

jvacek commented Oct 24, 2024

Clear cache + reload seems to have removed the warning again, will see if I can reproduce this again somehow

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Oct 24, 2024
anthonykim1 added a commit that referenced this issue Nov 4, 2024
Resolves #24345 and
#24290 and
#24105
remove automatic injection from before so only thing that allows shell
integration to user for Python terminal REPL is the setting itself.
anthonykim1 added a commit to anthonykim1/vscode-python that referenced this issue Nov 4, 2024
Resolves microsoft#24345 and
microsoft#24290 and
microsoft#24105
remove automatic injection from before so only thing that allows shell
integration to user for Python terminal REPL is the setting itself.
eleanorjboyd pushed a commit that referenced this issue Nov 6, 2024
Resolves #24345 and
#24290 and
#24105 remove automatic
injection from before so only thing that allows shell integration to
user for Python terminal REPL is the setting itself.
@anthonykim1
Copy link

Closing this, as I've made bunch of changes which should prevent this from happening but please let me know if it ever shows up again.

@anthonykim1 anthonykim1 added area-terminal bug Issue identified by VS Code Team member as probable bug and removed triage-needed Needs assignment to the proper sub-team labels Nov 12, 2024
@github-actions github-actions bot added the info-needed Issue requires more information from poster label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants