-
Notifications
You must be signed in to change notification settings - Fork 905
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
kedro ipython PYTHONPATH #1183
Labels
Issue: Bug Report 🐞
Bug that needs to be fixed
Comments
Hi @eepgwde, thanks very much for this. Please could you clarify whether it's actually something that is causing a problem? I do see from the |
Hello Anthony, I had a problem accessing a PIP component. I didn't see my PYTHONPATH in sysconfig.get_config_vars and when I looked through the code I saw this use of the semi-colon.
I managed to get access to the PIP module, but I have no idea how. It's path is not on the PYTHONPATH.
Walter
…________________________________
From: Antony Milne ***@***.***>
Sent: 28 January 2022 18:22
To: kedro-org/kedro ***@***.***>
Cc: Walter Eaves ***@***.***>; Mention ***@***.***>
Subject: Re: [kedro-org/kedro] kedro ipython PYTHONPATH (Issue #1183)
Hi @eepgwde<https://github.com/eepgwde>, thanks very much for this. Please could you clarify whether it's actually something that is causing any problems with how we currently have the code? I do see from the os.pathsep documentation<https://docs.python.org/3/library/os.html#os.pathsep> that os.pathsep looks more suitable than ;. But is this actually causing you any problems at the moment?
—
Reply to this email directly, view it on GitHub<#1183 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAMQO2LQVQJPZXHCBAW27BTUYLGFPANCNFSM5M6QC2ZA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Windows path separator
Context
I was looking at why my PYTHONPATH changes would not go through.
It didn't cause a problem, I thought it might!
Steps to Reproduce
I don't know how this code is triggered but
def _add_src_to_path(source_dir: Path, project_path: Path) -> None:
_validate_source_path(source_dir, project_path)
if str(source_dir) not in sys.path:
sys.path.insert(0, str(source_dir))
python_path = os.getenv("PYTHONPATH") or ""
if str(source_dir) not in python_path:
sep = ";" if python_path else ""
os.environ["PYTHONPATH"] = f"{str(source_dir)}{sep}{python_path}"
Expected Result
You should use os.pathsep in place of ';'
Actual Result
Tell us what happens instead.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
Name: kedro
Version: 0.17.4
Summary: Kedro helps you build production-ready data and analytics pipelines
Home-page: https://github.com/quantumblacklabs/kedro
Author: QuantumBlack Labs
Author-email:
License: Apache Software License (Apache 2.0)
Location: /home/share/conda/envs/vega/lib/python3.8/site-packages
Requires: jmespath, jupyter-client, gitpython, toml, cachetools, cookiecutter, fsspec, pip-tools, python-json-logger, dynaconf, anyconfig, click, PyYAML, pluggy, toposort, setuptools
Required-by: kedro-viz, kedro-telemetry
Python 3.8.12
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
cat: /etc/prelink.conf.d: Is a directory
Amazon Linux release 2 (Karoo)
uname -r -o
4.14.256-197.484.amzn2.x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: