无法将目录添加到 Python 路径
在我的 .bashrc 中,我添加了以下内容:
export PYTHONPATH=$PYTHONPATH:/home/tbao/src/Cython-0.14.1
当我重新登录时,出现错误:
-bash: /home/tbao/src/Cython-0.14。 1: 是一个目录,
我想将该目录添加到我的 pythonpath 中,但我不能。我做错了什么?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜想关于其中有空格的评论是正确的,为了处理这个问题,请引用右侧:
你能分享一下 PYTHONPATH 当前的值是什么吗?也许是这样的:
所以它被分成多行并且更容易阅读。
I would guess that the comments about there being spaces in are spot on, to handle that, quote the right-hand side:
Can you share what the current value of PYTHONPATH currently is? Perhaps with something like:
So it's split across multiple lines and easier to read.