René's URL Explorer Experiment


Title: Unresolved import with packages under "src" when installed as editable · Issue #1013 · microsoft/python-language-server · GitHub

Open Graph Title: Unresolved import with packages under "src" when installed as editable · Issue #1013 · microsoft/python-language-server

X Title: Unresolved import with packages under "src" when installed as editable · Issue #1013 · microsoft/python-language-server

Description: A project I am working on is structured with all its packages under a src folder in the project/workspace directory. I am using a local virtualenv for development (.venv/bin/python), and the package is installed in editable mode, meaning...

Open Graph Description: A project I am working on is structured with all its packages under a src folder in the project/workspace directory. I am using a local virtualenv for development (.venv/bin/python), and the packag...

X Description: A project I am working on is structured with all its packages under a src folder in the project/workspace directory. I am using a local virtualenv for development (.venv/bin/python), and the packag...

Opengraph URL: https://github.com/microsoft/python-language-server/issues/1013

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unresolved import with packages under \"src\" when installed as editable","articleBody":"A project I am working on is structured with all its packages under a `src` folder in the project/workspace directory.\r\n\r\nI am using a local virtualenv for development (`.venv/bin/python`), and the package is installed in editable mode, meaning it should be available in `sys.path` for that Python interpreter.\r\n\r\nHowever, Visual Studio Code fails to resolve any of the imports from these packages, throwing `unresolved-import` errors and missing autocompletes.\r\n\r\nAutocomplete instead suggests importing `src.mypackage`, instead of simply `mypackage`.\r\n\r\nI have tried various variations of `python.autoComplete.extraPaths`: `[\"${workspaceFolder}/src\"]`, `[\"src\"]`, `[\"./src\"]`, restarting the language server after each change, but none appear to work.\r\n\r\nI have attempted with the beta `downloadChannel as well, to no avail.\r\n\r\nThe Output tab prints the following:\r\n\r\n```\r\nStarting Microsoft Python language server.\r\n[...]\r\n[Info  - 1:45:13 PM] Python search paths:\r\n[...]\r\n[Info  - 1:45:13 PM]     /Users/rye/Documents/my-project/.venv/lib/python3.7/site-packages\r\n[Info  - 1:45:13 PM]     /Users/rye/Documents/my-project/src\r\n[Info  - 1:45:13 PM] Configuration search paths:\r\n[Info  - 1:45:13 PM]     /Users/rye/Documents/my-project/src\r\n[Info  - 1:45:13 PM] Microsoft Python Language Server version 0.2.62.0\r\n```\r\n\r\nThis seems to suggest that the language server has detected the folder both in the Python installation's `sys.path`, as well as the configured `python.autoComplete.extraPaths`\r\n\r\nHow do I get the language server to resolve my imports properly?","author":{"url":"https://github.com/eirikrye","@type":"Person","name":"eirikrye"},"datePublished":"2019-04-25T11:52:50Z","url":"https://github.com/microsoft/python-language-server/issues/1013"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:91d64d58-4144-0d1d-fc68-d1c58287274a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD4C:329923:72BC19:9B1078:6AFE6865
html-safe-nonce62ae3b9e2c61ed458cbcb018e61b11143ac413f27a6e47165a7687e04fa02644
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDRDOjMyOTkyMzo3MkJDMTk6OUIxMDc4OjZBRkU2ODY1IiwidmlzaXRvcl9pZCI6IjI0OTE3ODM2MTcxMTAyMzkzMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac64e36daa946a7de549913a31d30f636f558366b3bf1a8791ca0c747863938738
hovercard-subject-tagissue:437158190
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/python-language-server/1013/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f8f1c96dfb17524d4a2d5d18977eabbcc1cb11ffdc8678313e914461dca73441/microsoft/python-language-server/issues/1013
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f8f1c96dfb17524d4a2d5d18977eabbcc1cb11ffdc8678313e914461dca73441/microsoft/python-language-server/issues/1013
og:image:altA project I am working on is structured with all its packages under a src folder in the project/workspace directory. I am using a local virtualenv for development (.venv/bin/python), and the packag...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameeirikrye
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/microsoft/python-language-server git https://github.com/microsoft/python-language-server.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id145901977
octolytics-dimension-repository_nwomicrosoft/python-language-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id145901977
octolytics-dimension-repository_network_root_nwomicrosoft/python-language-server
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/python-language-server/issues/1013#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpython-language-server%2Fissues%2F1013
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpython-language-server%2Fissues%2F1013
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2Fpython-language-server
Reloadhttps://github.com/microsoft/python-language-server/issues/1013
Reloadhttps://github.com/microsoft/python-language-server/issues/1013
Reloadhttps://github.com/microsoft/python-language-server/issues/1013
microsofthttps://github.com/microsoft
python-language-serverhttps://github.com/microsoft/python-language-server
Codehttps://github.com/microsoft/python-language-server
Issues309 (309)https://github.com/microsoft/python-language-server/issues
Pull requests6 (6)https://github.com/microsoft/python-language-server/pulls
Projectshttps://github.com/microsoft/python-language-server/projects
Wikihttps://github.com/microsoft/python-language-server/wiki
Security and qualityhttps://github.com/microsoft/python-language-server/security
Insightshttps://github.com/microsoft/python-language-server/insights
https://github.com/microsoft/python-language-server
#1183https://github.com/microsoft/python-language-server/pull/1183
Unresolved import with packages under "src" when installed as editablehttps://github.com/microsoft/python-language-server/issues/1013#top
#1183https://github.com/microsoft/python-language-server/pull/1183
https://github.com/jakebailey
editable-installspip editable installs / setup.py develophttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22editable-installs%22
June 2019.1https://github.com/microsoft/python-language-server/milestone/19
https://github.com/eirikrye
Eirik Rye (eirikrye)https://github.com/eirikrye
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#issue-437158190
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-486738244
#989https://github.com/microsoft/python-language-server/issues/989
https://github.com/eirikrye
Eirik Rye (eirikrye)https://github.com/eirikrye
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-486760690
#989https://github.com/microsoft/python-language-server/issues/989
this blog posthttps://blog.ionelmc.ro/2014/05/25/python-packaging/
cryptographyhttps://github.com/pyca/cryptography
twistedhttps://github.com/twisted/twisted
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-486761850
https://github.com/eirikrye
Eirik Rye (eirikrye)https://github.com/eirikrye
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-486774754
https://github.com/eirikrye/vscode-1013-reprohttps://github.com/eirikrye/vscode-1013-repro
Jake Bailey (jakebailey)https://github.com/jakebailey
on Apr 25, 2019https://github.com/microsoft/python-language-server/issues/1013#event-2301069827
https://github.com/j9ac9k
Ogi Moore (j9ac9k)https://github.com/j9ac9k
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488824472
https://github.com/egabrum
egabrumhttps://github.com/egabrum
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488848067
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488848572
https://github.com/eirikrye
Eirik Rye (eirikrye)https://github.com/eirikrye
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488849454
egabrumhttps://github.com/egabrum
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488858689
https://user-images.githubusercontent.com/5341706/57110969-532dba00-6cef-11e9-8231-d9d3a4c29d07.png
https://user-images.githubusercontent.com/5341706/57110974-59239b00-6cef-11e9-942c-292f4b05683a.png
#537https://github.com/microsoft/python-language-server/issues/537
Alexander Sher (@AlexanderSher)https://github.com/AlexanderSher
https://github.com/egabrum
egabrumhttps://github.com/egabrum
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488858834
egabrumhttps://github.com/egabrum
Eirik Rye (@eirikrye)https://github.com/eirikrye
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488859990
egabrumhttps://github.com/egabrum
https://user-images.githubusercontent.com/5341706/57111682-e23bd180-6cf1-11e9-9daf-55eb8580c229.png
https://github.com/egabrum
egabrumhttps://github.com/egabrum
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488862596
egabrumhttps://github.com/egabrum
https://user-images.githubusercontent.com/1711744/57112111-7fe3d080-6cf3-11e9-8bc2-3de32fe12cfe.png
https://user-images.githubusercontent.com/1711744/57112117-82dec100-6cf3-11e9-9b44-fe8415258b74.png
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488863413
#955https://github.com/microsoft/python-language-server/issues/955
https://github.com/egabrum
egabrumhttps://github.com/egabrum
on May 2, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488870268
https://github.com/AlexanderSher
Alexander Sher (AlexanderSher)https://github.com/AlexanderSher
on May 3, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-488879536
Jake Bailey (jakebailey)https://github.com/jakebailey
editable-installspip editable installs / setup.py develophttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22editable-installs%22
on May 9, 2019https://github.com/microsoft/python-language-server/issues/1013#event-2331423641
https://github.com/carmenbianca
Carmen Bianca BAKKER (carmenbianca)https://github.com/carmenbianca
on May 16, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-493023559
https://github.com/carmenbianca/vscodesrchttps://github.com/carmenbianca/vscodesrc
https://github.com/carmenbianca
Carmen Bianca BAKKER (carmenbianca)https://github.com/carmenbianca
on May 16, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-493024935
https://github.com/fsfe/reuse-toolhttps://github.com/fsfe/reuse-tool
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on May 16, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-493131334
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-499985331
https://user-images.githubusercontent.com/5341706/59124525-c5a84000-8914-11e9-8b97-b3032370c6a0.png
https://github.com/j9ac9k
Ogi Moore (j9ac9k)https://github.com/j9ac9k
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-499986660
Jake Bailey (@jakebailey)https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
completedhttps://github.com/microsoft/python-language-server/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#1183https://github.com/microsoft/python-language-server/pull/1183
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#event-2398603976
https://github.com/jakebailey
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#issuecomment-500069563
https://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#unresolved-import-warningshttps://github.com/microsoft/python-language-server/blob/master/TROUBLESHOOTING.md#unresolved-import-warnings
#1183https://github.com/microsoft/python-language-server/pull/1183
Jake Bailey (jakebailey)https://github.com/jakebailey
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#event-2398620247
Jake Bailey (jakebailey)https://github.com/jakebailey
June 2019.1https://github.com/microsoft/python-language-server/milestone/19
on Jun 7, 2019https://github.com/microsoft/python-language-server/issues/1013#event-2398620279
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/python-language-server/issues/1013
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/python-language-server/issues/1013
Jake Bailey (jakebailey)https://github.com/jakebailey
editable-installspip editable installs / setup.py develophttps://github.com/microsoft/python-language-server/issues?q=state%3Aopen%20label%3A%22editable-installs%22
June 2019.1https://github.com/microsoft/python-language-server/milestone/19
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.