小编nja*_*x22的帖子

PyCharm 中的“Feather”库安装失败

我对 Python 还很陌生,我正在尝试下载羽毛库,但出现错误。我已经更新了 pip 和 setuptools,但仍然出现错误。这是我从 PyCharm 得到的输出:


    Collecting feather
Using cached https://files.pythonhosted.org/packages/77/d1/073c848713d9987f48d0bc8415646760a069ef3ca80e9b45fdb6b4422133/feather-0.9.1dev.tar.gz
Complete output from command python setup.py egg_info:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Traceback (most recent call last):
File "C:\Users\NICKAL~1\AppData\Local\Temp\pycharm-packaging\feather\distribute_setup.py", line 143, in use_setuptools
raise ImportError
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\NICKAL~1\AppData\Local\Temp\pycharm-packaging\feather\setup.py", line 3, in <module>
    distribute_setup.use_setuptools()
  File "C:\Users\NICKAL~1\AppData\Local\Temp\pycharm-packaging\feather\distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "C:\Users\NICKAL~1\AppData\Local\Temp\pycharm-packaging\feather\distribute_setup.py", line 124, …
Run Code Online (Sandbox Code Playgroud)

python pycharm

5
推荐指数
1
解决办法
1003
查看次数

抑制 python 警告

当我在 for 循环中迭代时,我不断收到相同的警告,我想抑制它。警告内容如下:

C:\Users\Nick Alexander\AppData\Local\Programs\Python\Python37\lib\site-packages\sklearn\preprocessing\data.py:193: UserWarning: Numerical issues were encountered when scaling the data and might not be solved. The standard deviation of the data is probably very close to 0. warnings.warn("Numerical issues were encountered "

产生警告的代码如下:

def monthly_standardize(cols, df_train, df_train_grouped, df_val, df_val_grouped, df_test, df_test_grouped):
    # Disable the SettingWithCopyWarning warning
    pd.options.mode.chained_assignment = None
    for c in cols:
        df_train[c] = df_train_grouped[c].transform(lambda x: scale(x.astype(float)))
        df_val[c] = df_val_grouped[c].transform(lambda x: scale(x.astype(float)))
        df_test[c] = df_test_grouped[c].transform(lambda x: scale(x.astype(float)))
    return df_train, df_val, df_test
Run Code Online (Sandbox Code Playgroud)

我已经禁用了一个警告。我不想禁用所有警告,我只想禁用此警告。我正在使用 python 3.7 和 …

python suppress-warnings

5
推荐指数
2
解决办法
2万
查看次数

标签 统计

python ×2

pycharm ×1

suppress-warnings ×1