python - 在 POP!_os 中将 Tensorflow 添加到 PATH 时出错(类似于 Ubuntu)
问题描述
我不确定如何解决这个问题,因为我对 POP!_os 和 Linux 很陌生。我想将 TensorFlow 安装到我的 Pycharm IDE,但收到一条很长的错误消息,告诉我将一堆目录添加到 PATH。运行后出现此错误pip install TensorFlow-gpu
。
WARNING: The scripts pyrsa-decrypt, pyrsa-encrypt, pyrsa-keygen, pyrsa-priv2pub, pyrsa-sign and pyrsa-verify are installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script wheel is installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script markdown_py is installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script google-oauthlib-tool is installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script tensorboard is installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts estimator_ckpt_converter, import_pb_to_tensorboard, saved_model_cli, tensorboard, tf_upgrade_v2, tflite_convert, toco and toco_from_protos are installed in '/home/trkornman/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
我想知道是否有这个命令,或者我是否必须手动移动它们,如果是这样,我可以在我的文件资源管理器中找到 PATH 。
解决方案
您需要添加~/.local/bin
到您的PATH
. 你可以通过设置PATH
你~/.profile
喜欢的来做到这一点
在您的主目录中打开一个名为.profile
. 如果它不存在,请使用您喜欢的任何文本编辑器创建它。
nano ~/.profile
走到最后并添加这个
PATH="$HOME"/.local/bin:"$PATH"
如果$HOME
未定义(echo $HOME
应该显示您的主目录)尝试用您的用户名替换它
PATH=/home/trkornman/.local/bin:"$PATH"
之后您需要重新启动/重新登录才能工作。
推荐阅读
- typescript - Firestore 多次定时批量提交挂起而没有任何响应
- javascript - JS:对如何让函数返回它的参数连接感到困惑
- javascript - AngularJS控制器没有被执行
- java - 尝试打开 Excel 工作簿时出现错误时,Try/Catch 不会激活
- python - 时间戳不会从字符串转换为浮点数
- java - 如何以编程方式关闭 Android 中的共享系统对话框?
- sql - DB2 SQL - 内部联接获取最后一行
- amazon-web-services - 从 PySpark 批量加载到 AWS RDS (postgres)
- java - Java兼容编译模式
- redis - 主从数量不均匀的情况下动态设置 Redis 集群