小编Jaz*_*een的帖子

为什么 NVM 使用错误的 Python 版本?

我的包有一些问题node-gyp,我相信这是因为我需要使用 python 2.7 而不是 python 3。

我已经设置了 PATH 环境变量,以便当我执行时python --version输出为Python 2.7.16.

但是,在同一个终端中,当我去yarn安装我的项目时。它失败了,我可以看到日志的输出是:

Command: node-gyp rebuild
Arguments:
Directory: /Users/myname/Documents/myproject
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.14.0 | darwin | x64
gyp info find Python using Python version 3.7.3 found at "/Users/myname/anaconda3/bin/python"
Run Code Online (Sandbox Code Playgroud)

我也在用nvm。卡塔琳娜 10.15.2。节点 12.14.0。NVM 0.33.11。

为什么我的终端版本显示我使用的是 2.7,但日志显示该命令node-gyp rebuild使用的是 3.7.3?如果我已经设置了环境变量,我可以更改什么来纠正这个问题?和nvm有关系吗?

python macos node.js nvm

19
推荐指数
3
解决办法
3万
查看次数

C# 将类型 double 转换为 float

我是 C# 的新手,我不知道为什么在这些代码行上出现以下错误。

“错误 CS0266:无法将类型 'double' 隐式转换为 'float'。存在显式转换(您是否缺少强制转换?)”

float rightEdgeOfFormation = (float) transform.position.x + (width * 0.5);
float leftEdgeOfFormation = (float) transform.position.x - (width * 0.5);
Run Code Online (Sandbox Code Playgroud)

我认为写作(浮动)是演员?

非常感谢!

c# types unity-game-engine

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

c# ×1

macos ×1

node.js ×1

nvm ×1

python ×1

types ×1

unity-game-engine ×1