(pydvc) Z:>cd Z:\ФД\Валидация\Валидация2024 Системе не удается найти указанный путь.…
- User
(py_dvc) Z:>cd Z:\ФД\Валидация\Валидация_2024 Системе не удается найти указанный путь. Такой путь существует в системе, но Anaconda Promt выдает ошибку
- Assistant
Похоже, что указанный путь в системе существует, но Anaconda Prompt не может его найти. Проверьте правильность указания пути и убедитесь, что введенный путь действительно существует в файловой системе.
- User
RuntimeError Traceback (most recent call last) RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe Output exceeds the size limit. Open the full output data in a text editor--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 3 1 import pandas as pd 2 import numpy as np ----> 3 from sklearn.metrics import roc_auc_score, confusion_matrix, roc_curve, precision_recall_curve, f1_score, auc,
4 accuracy_score, precision_score, recall_score 5 from sklearn.calibration import CalibratedClassifierCV 6 import matplotlib.pyplot as pltFile c:\Work\Anaconda3\envs\py_dvc\lib\site-packages\sklearn_init_.py:82 80 from . import _distributor_init # noqa: F401 81 from . import __check_build # noqa: F401 ---> 82 from .base import clone 83 from .utils._show_versions import show_versions 85 all = [ 86 "calibration", 87 "cluster", (...) 128 "show_versions", 129 ]
File c:\Work\Anaconda3\envs\py_dvc\lib\site-packages\sklearn\base.py:17 15 from . import 16 from ._config import get_config ... 12 get_csr_submatrix) 13 from ._sputils import upcast 15 from ._compressed import _cs_matrix
- Assistant
Looks like you are encountering an
ImportErrorrelated to numpy. The error message suggests that the module you are trying to import is compiled against a different version of numpy (API version 0xf) than the one installed in your environment (API version 0xe).To resolve this issue, you can try the following steps:
-
Make sure you are using the correct environment (
py_dvc) in Anaconda Prompt. Activate the environment using the command:conda activate py_dvc. -
Upgrade numpy in your environment to the latest version using the command:
conda install numpy --update. -
If the above step doesn't work, try reinstalling numpy using the command:
pip uninstall numpyfollowed bypip install numpy. Make sure to run these commands in your activatedpy_dvcenvironment.
If the issue persists, you may need to provide more information or consider seeking help from the Anaconda community or numpy developers to troubleshoot the specific problem with the numpy version in your environment.
-
- User
ERROR: failed to reproduce 'train_model': [Errno 2] No such file or directory: 'Z:\ADD\ФД\Валидация\Валидация_2024\1_Кредитный риск\1. Розничные модели\02. Поведенческие\04. КК\112023_beh_kk5pl\.dvc\cache\runs\dc\dce43cdaf90fde67467af33b88e89644e8c6eb5c258cf29f38b418af106f5202\4f943605a0e4eda9d7de94553f02ee45f49abffff3cbe4d745863e5f4aeb55c2.KBFVZ6eNZ4k77tgoFTGZb2'
- Assistant
The error message indicates that the specified file or directory does not exist: 'Z:\ADD\ФД\Валидация\Валидация_2024\1_Кредитный риск\1. Розничные модели\02. Поведенческие\04. КК\112023_beh_kk5pl.dvc\cache\runs\dc\dce43cdaf90fde67467af33b88e89644e8c6eb5c258cf29f38b418af106f5202\4f943605a0e4eda9d7de94553f02ee45f49abffff3cbe4d745863e5f4aeb55c2.KBFVZ6eNZ4k77tgoFTGZb2'.
Make sure that the file or directory path you are referencing is correct and exists on your system. It seems like the file or directory is missing or was deleted. Double-check the path and make sure all the directories and files in the path are accurate and accessible.
If you've moved the file or directory to a different location, you need to update the path accordingly.
- User
ValueError: Cannot setitem on a Categorical with a new category, set the categories first
- Assistant
The error message suggests that you are trying to assign a new category to a categorical variable without first setting the categories for that variable.
When working with categorical variables in pandas, you need to explicitly define the categories before assigning new values. Here's how you can resolve this issue:
-
Determine the unique categories for your categorical variable using the
unique()orcategoriesattribute. -
If the new category you want to assign is not already in the categories list, you need to add it. You can use the
add_categories()method to add the new category to the existing categories.
Here's an example:
python -