我的问题/问题:
我现在的程序是使用cin >>以获取输入和除了我需要使用多数民众赞成在工作的罚款getline()在一个点上,我知道我不应该像混为一谈getline(),并cin.get()用cin >>.如何在不使用的情况下输入整数>>?
研究:
我试图对此进行研究,但我发现的每一个结果都说使用cin >> 这是我发现的最接近的结果.
我会很高兴找到避免使用的方法getline().
我尝试为Python 3安装scikit-learn.我按以下方式进行:
virtualenv model_env
source model_env/bin/activate
pip3 install sklearn
Run Code Online (Sandbox Code Playgroud)
因此,我收到以下错误消息:
Downloading/unpacking sklearn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement sklearn
Cleaning up...
No distributions at all found for sklearn
Run Code Online (Sandbox Code Playgroud)
我遇到了与pandas包相同的问题,我使用以下命令解决了它:
sudo apt-get install python3-pandas
Run Code Online (Sandbox Code Playgroud)
不幸的是,同样的方法不适用于 sklearn
sudo apt-get install python3-sklearn
Run Code Online (Sandbox Code Playgroud)
添加
当我更换sklearn的scikit-learn,我也有同样的问题:
Downloading/unpacking scikit-learn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement scikit-learn
Cleaning up...
No distributions at all …Run Code Online (Sandbox Code Playgroud) 我的老师说我们不能在 if 语句中使用三元运算符,因为它是它的替代品......谁能告诉我我们是否可以在 c++ 的 if 语句中使用三元运算符?