Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when downloading requirements #2047

Closed
SebaSilvaS opened this issue Jan 26, 2021 · 13 comments
Closed

Problems when downloading requirements #2047

SebaSilvaS opened this issue Jan 26, 2021 · 13 comments
Labels
bug Something isn't working

Comments

@SebaSilvaS
Copy link

🐛 Bug

First of all, thanks a lot to the people behind this amazing repo. I'm quite new in GitHub, so please understand if I make common newbie mistakes when asking or raising this issue.

Having mentioned the above, I'm having problems when installing this repo's dependencies. Particularly with "torch==0.8.1", "scikit-learn==0.19.2", and "pycocotools>=2.0". The error throws a huge red message (I'm not sure if I can copy it completely here).

To Reproduce (REQUIRED)

I'm using none extra code at all. The steps I followed are the following:

  1. create and open a folder in my desktop
  2. open cmd
  3. write "git clone https://github.com/ultralytics/yolov5"
  4. write "conda create --name yolov5_tb python=3.8.5"
  5. write "conda activate yolov5_tb"
  6. write "cd yolov5"
    8.a. open the requirements.txt file and erase the "#" from the
    8.b. copy and paste the "pip install -r requirements.txt" command from this repo
  7. "ERROR: Could not find a version that satisfies the requirement torchvision>=0.8.1
    ERROR: No matching distribution found for torchvision>=0.8.1" is displayed in the screen.

So, I decided to install torchvision using the following command: "conda install pytorch torchvision torchaudio cudatoolkit=10.1 -c pytorch", gathered from https://pytorch.org/get-started/locally/.

Next, I ran the "pip install -r requirements.txt" command again and it started doing it thing. Here is where I get the huge red error text.

Output:

Building wheels for collected packages: scikit-learn, pycocotools
  Building wheel for scikit-learn (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\sgsil\anaconda3\envs\yolov5_ts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sgsil\\AppData\\Local\\Temp\\pip-install-h5nhkodb\\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\\setup.py'"'"'; __file__='"'"'C:\\Users\\sgsil\\AppData\\Local\\Temp\\pip-install-h5nhkodb\\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sgsil\AppData\Local\Temp\pip-wheel-e2d0trq2'
       cwd: C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\
  Complete output (15 lines):
  Partial import of sklearn during the build process.
  Traceback (most recent call last):
    File "C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\setup.py", line 148, in get_scipy_status
      import scipy
  ModuleNotFoundError: No module named 'scipy'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\setup.py", line 269, in <module>
      setup_package()
    File "C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\scikit-learn_ce6f41bc8c004837ba2bc0ca8ee84615\setup.py", line 257, in setup_package
      raise ImportError("Scientific Python (SciPy) is not "
  ImportError: Scientific Python (SciPy) is not installed.
  scikit-learn requires SciPy >= 0.13.3.
  Installation instructions are available on the scikit-learn website: http://scikit-learn.org/stable/install.html

  ----------------------------------------
  ERROR: Failed building wheel for scikit-learn
  Running setup.py clean for scikit-learn
  Building wheel for pycocotools (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\sgsil\anaconda3\envs\yolov5_ts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sgsil\\AppData\\Local\\Temp\\pip-install-h5nhkodb\\pycocotools_9dabe2034c03412eae93b685865ba3ff\\setup.py'"'"'; __file__='"'"'C:\\Users\\sgsil\\AppData\\Local\\Temp\\pip-install-h5nhkodb\\pycocotools_9dabe2034c03412eae93b685865ba3ff\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sgsil\AppData\Local\Temp\pip-wheel-1imgreu3'
       cwd: C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\pycocotools_9dabe2034c03412eae93b685865ba3ff\
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\coco.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\mask.py -> build\lib.win-amd64-3.8\pycocotools
  copying pycocotools\__init__.py -> build\lib.win-amd64-3.8\pycocotools
  running build_ext
  cythoning pycocotools/_mask.pyx to pycocotools\_mask.c
  c:\users\sgsil\appdata\local\temp\pip-install-h5nhkodb\pycocotools_9dabe2034c03412eae93b685865ba3ff\.eggs\cython-0.29.21-py3.8-win-amd64.egg\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\sgsil\AppData\Local\Temp\pip-install-h5nhkodb\pycocotools_9dabe2034c03412eae93b685865ba3ff\pycocotools\_mask.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'pycocotools._mask' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Failed to build scikit-learn pycocotools
Installing collected packages: urllib3, pyasn1, idna, chardet, smmap, rsa, requests, pyasn1-modules, oauthlib, cachetools, requests-oauthlib, pytz, python-dateutil, pyparsing, pathtools, mpmath, kiwisolver, google-auth, gitdb, cycler, werkzeug, watchdog, tqdm, tensorboard-plugin-wit, sympy, subprocess32, shortuuid, sentry-sdk, scipy, PyYAML, psutil, protobuf, promise, pandas, packaging, matplotlib, markdown, grpcio, google-auth-oauthlib, GitPython, docker-pycreds, Cython, configparser, Click, attrs, attr, absl-py, wandb, thop, tensorboard, seaborn, scikit-learn, pycocotools, opencv-python, onnx, coremltools
    Running setup.py install for scikit-learn ... error
... 
it keeps going
....

Expected behavior

I would expect every dependencies to be correctly and straight-forwardly installed.

Environment

If applicable, add screenshots to help explain your problem.

  • OS: Windows 10
  • GPU: NVIDIA GTX 1650
  • CPU: AMD RYZEN 7 3750H

Additional context

@SebaSilvaS SebaSilvaS added the bug Something isn't working label Jan 26, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 26, 2021

👋 Hello @SebaSilvaS, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com.

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@setho246
Copy link

setho246 commented Jan 26, 2021

To add to this:

I also stumbled across this issue late last night, but not using conda.

I cloned the project, and tried running pip install -r requirements.txt, which errored out due to the torchvision requirement, with the report of ERROR: Could not find a version that satisfies the requirement torchvision>=0.8.1

Attempting to run the train script failed as above on the SciPy import, so I ran pip install ScyPy. Attempting to start training again errored out on the next import, which I then imported.

This allowed me to slowly import all modules, INCLUDING TORCHVISION, which by using straight pip install installed torchvision==0.8.2 which should match the version requirement of torchvision>=0.8.1

After all imports are done, attempting to train fails on checking requirements as the requirement checking logic appears to deem torchvision==0.8.2 as invalid.

@glenn-jocher
Copy link
Member

glenn-jocher commented Jan 26, 2021

@SebaSilvaS @setho246 it appears you may have environment problems. Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.8 environment, clone the latest repo (code changes daily), and pip install -r requirements.txt again. We also highly recommend using one of our verified environments below.

Requirements

Python 3.8 or later with all requirements.txt dependencies installed, including torch>=1.7. To install run:

$ pip install -r requirements.txt

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are passing. These tests evaluate proper operation of basic YOLOv5 functionality, including training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu.

@glenn-jocher
Copy link
Member

@SebaSilvaS @setho246 also note your particular environment may require custom installation commands for torch and torchvision. See https://pytorch.org/get-started/locally/ for specifics. You would run these custom torch installation commands prior to pip install -r requirements.txt.

@setho246
Copy link

Cheers, I'll test some more when I get the chance and report back

@SebaSilvaS
Copy link
Author

SebaSilvaS commented Jan 27, 2021

I realized I had CUDA 10.1, so the latest version I could download for torchvision was 0.2.2.post3. However, this update does not fix my problem. Here is my environment, it is running on python 3.8.5:

# Name                    Version                   Build  Channel
absl-py                   0.11.0                   pypi_0    pypi
attr                      0.3.1                    pypi_0    pypi
attrs                     20.3.0                   pypi_0    pypi
blas                      1.0                         mkl
ca-certificates           2021.1.19            haa95532_0
cachetools                4.2.1                    pypi_0    pypi
certifi                   2020.12.5        py38haa95532_0
chardet                   4.0.0                    pypi_0    pypi
click                     7.1.2                    pypi_0    pypi
configparser              5.0.1                    pypi_0    pypi
cudatoolkit               10.2.89              h74a9793_1
cycler                    0.10.0                   pypi_0    pypi
cython                    0.29.21                  pypi_0    pypi
docker-pycreds            0.4.0                    pypi_0    pypi
freetype                  2.10.4               hd328e21_0
gitdb                     4.0.5                    pypi_0    pypi
gitpython                 3.1.12                   pypi_0    pypi
google-auth               1.24.0                   pypi_0    pypi
google-auth-oauthlib      0.4.2                    pypi_0    pypi
grpcio                    1.35.0                   pypi_0    pypi
idna                      2.10                     pypi_0    pypi
intel-openmp              2020.2                      254
jpeg                      9b                   hb83a4c4_2
kiwisolver                1.3.1                    pypi_0    pypi
libpng                    1.6.37               h2a8f88b_0
libtiff                   4.1.0                h56a325e_1
libuv                     1.40.0               he774522_0
lz4-c                     1.9.3                h2bbff1b_0
markdown                  3.3.3                    pypi_0    pypi
matplotlib                3.3.3                    pypi_0    pypi
mkl                       2020.2                      256
mkl-service               2.3.0            py38h196d8e1_0
mkl_fft                   1.2.0            py38h45dec08_0
mkl_random                1.1.1            py38h47e9c7a_0
mpmath                    1.1.0                    pypi_0    pypi
ninja                     1.10.2           py38h6d14046_0
numpy                     1.19.2           py38hadc3359_0
numpy-base                1.19.2           py38ha3acd2a_0
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                       py_0
openssl                   1.1.1i               h2bbff1b_0
packaging                 20.8                     pypi_0    pypi
pandas                    1.2.1                    pypi_0    pypi
pathtools                 0.1.2                    pypi_0    pypi
pillow                    8.1.0            py38h4fa10fc_0
pip                       20.3.3           py38haa95532_0
promise                   2.3                      pypi_0    pypi
protobuf                  3.14.0                   pypi_0    pypi
psutil                    5.8.0                    pypi_0    pypi
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pyparsing                 2.4.7                    pypi_0    pypi
python                    3.8.5                h5fd99cc_1
python-dateutil           2.8.1                    pypi_0    pypi
pytorch                   1.7.1           py3.8_cuda102_cudnn7_0    pytorch
pytz                      2020.5                   pypi_0    pypi
pyyaml                    5.4.1                    pypi_0    pypi
requests                  2.25.1                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.7                      pypi_0    pypi
scipy                     1.6.0                    pypi_0    pypi
seaborn                   0.11.1                   pypi_0    pypi
sentry-sdk                0.19.5                   pypi_0    pypi
setuptools                52.0.0           py38haa95532_0
shortuuid                 1.0.1                    pypi_0    pypi
six                       1.15.0           py38haa95532_0
smmap                     3.0.5                    pypi_0    pypi
sqlite                    3.33.0               h2a8f88b_0
subprocess32              3.5.4                    pypi_0    pypi
sympy                     1.7.1                    pypi_0    pypi
tensorboard               2.4.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.0                    pypi_0    pypi
thop                      0.0.31-2005241907          pypi_0    pypi
tk                        8.6.10               he774522_0
torchaudio                0.7.2                      py38    pytorch
torchvision               0.8.2                py38_cu102    pytorch
tqdm                      4.56.0                   pypi_0    pypi
typing_extensions         3.7.4.3                    py_0
urllib3                   1.26.3                   pypi_0    pypi
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wandb                     0.10.15                  pypi_0    pypi
watchdog                  0.10.4                   pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.36.2             pyhd3eb1b0_0
wincertstore              0.2                      py38_0
xz                        5.2.5                h62dcd97_0
zlib                      1.2.11               h62dcd97_4
zstd                      1.4.5                h04227a9_0

EDITED:

I just downgraded torchvision to 0.8.1 and, therefore, pytorch to 1.7.0. The problem persists.
I also noticed that opencv-python line in the requirements.txt file is not being executed.

@SebaSilvaS
Copy link
Author

SebaSilvaS commented Jan 27, 2021

I got a "patch" solution. I change the "check_requirements" function to:

def check_requirements(file='requirements.txt'):
    pass

Since pycocotools is not needed in train.py nor detect.py, now I'm being able to train with a custom dataset. The only thing that I'm still messing around with is the wandb 1,2,3 option... when I press 2, it asks for the 40 digits code which I'm not being able to paste (not even write by hand).

@glenn-jocher
Copy link
Member

@SebaSilvaS thanks for the feedback.

What environment are you having difficulty with wandb login? @AyushExel might be able to help you with that, he's our resident wandb expert :)

@AyushExel
Copy link
Contributor

@SebaSilvaS what environment are you using? I tried authenticating wandb in colab, jupyter and a local terminal and I was able to login without problems. Let me know how I can reproduce your problem.

@SebaSilvaS
Copy link
Author

@glenn-jocher and @AyushExel, thanks for your time and attention. Im running it on a local environment, running on Python 3.8.5:

# Name                    Version                   Build  Channel
absl-py                   0.11.0                   pypi_0    pypi
attr                      0.3.1                    pypi_0    pypi
attrs                     20.3.0                   pypi_0    pypi
blas                      1.0                         mkl
ca-certificates           2021.1.19            haa95532_0
cachetools                4.2.1                    pypi_0    pypi
certifi                   2020.12.5        py38haa95532_0
chardet                   4.0.0                    pypi_0    pypi
click                     7.1.2                    pypi_0    pypi
configparser              5.0.1                    pypi_0    pypi
cudatoolkit               10.2.89              h74a9793_1
cycler                    0.10.0                   pypi_0    pypi
cython                    0.29.21                  pypi_0    pypi
dataclasses               0.6                      pypi_0    pypi
docker-pycreds            0.4.0                    pypi_0    pypi
freetype                  2.10.4               hd328e21_0
future                    0.18.2                   pypi_0    pypi
gitdb                     4.0.5                    pypi_0    pypi
gitpython                 3.1.12                   pypi_0    pypi
google-auth               1.24.0                   pypi_0    pypi
google-auth-oauthlib      0.4.2                    pypi_0    pypi
grpcio                    1.35.0                   pypi_0    pypi
idna                      2.10                     pypi_0    pypi
intel-openmp              2020.2                      254
jpeg                      9b                   hb83a4c4_2
kiwisolver                1.3.1                    pypi_0    pypi
libpng                    1.6.37               h2a8f88b_0
libtiff                   4.1.0                h56a325e_1
libuv                     1.40.0               he774522_0
lz4-c                     1.9.3                h2bbff1b_0
markdown                  3.3.3                    pypi_0    pypi
matplotlib                3.3.3                    pypi_0    pypi
mkl                       2020.2                      256
mkl-service               2.3.0            py38h196d8e1_0
mkl_fft                   1.2.0            py38h45dec08_0
mkl_random                1.1.1            py38h47e9c7a_0
mpmath                    1.1.0                    pypi_0    pypi
ninja                     1.10.2           py38h6d14046_0
numpy                     1.19.2           py38hadc3359_0
numpy-base                1.19.2           py38ha3acd2a_0
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                       py_0
opencv-python             4.5.1.48                 pypi_0    pypi
openssl                   1.1.1i               h2bbff1b_0
packaging                 20.8                     pypi_0    pypi
pandas                    1.2.1                    pypi_0    pypi
pathtools                 0.1.2                    pypi_0    pypi
pillow                    8.1.0            py38h4fa10fc_0
pip                       20.3.3           py38haa95532_0
promise                   2.3                      pypi_0    pypi
protobuf                  3.14.0                   pypi_0    pypi
psutil                    5.8.0                    pypi_0    pypi
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pycocotools-windows       2.0                      pypi_0    pypi
pyparsing                 2.4.7                    pypi_0    pypi
python                    3.8.5                h5fd99cc_1
python-dateutil           2.8.1                    pypi_0    pypi
pytorch                   1.7.0           py3.8_cuda102_cudnn7_0    pytorch
pytz                      2020.5                   pypi_0    pypi
pyyaml                    5.4.1                    pypi_0    pypi
requests                  2.25.1                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.7                      pypi_0    pypi
scipy                     1.6.0                    pypi_0    pypi
seaborn                   0.11.1                   pypi_0    pypi
sentry-sdk                0.19.5                   pypi_0    pypi
setuptools                52.0.0           py38haa95532_0
shortuuid                 1.0.1                    pypi_0    pypi
six                       1.15.0           py38haa95532_0
smmap                     3.0.5                    pypi_0    pypi
sqlite                    3.33.0               h2a8f88b_0
subprocess32              3.5.4                    pypi_0    pypi
sympy                     1.7.1                    pypi_0    pypi
tensorboard               2.4.1                    pypi_0    pypi
tensorboard-plugin-wit    1.8.0                    pypi_0    pypi
thop                      0.0.31-2005241907          pypi_0    pypi
tk                        8.6.10               he774522_0
torchaudio                0.7.0                      py38    pytorch
torchvision               0.8.1                py38_cu102    pytorch
tqdm                      4.56.0                   pypi_0    pypi
typing_extensions         3.7.4.3                    py_0
urllib3                   1.26.3                   pypi_0    pypi
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wandb                     0.10.15                  pypi_0    pypi
watchdog                  0.10.4                   pypi_0    pypi
werkzeug                  1.0.1                    pypi_0    pypi
wheel                     0.36.2             pyhd3eb1b0_0
wincertstore              0.2                      py38_0
xz                        5.2.5                h62dcd97_0
zlib                      1.2.11               h62dcd97_4
zstd                      1.4.5                h04227a9_0

I'm following this steps:

  1. open yolov5 folder
  2. open cmd
  3. run the "python trian.py" line
  4. press 2 when asked. Here I noticed that some of the "wandb" were written in blue. Usually when I ran it defining more parsers in the command line it shows "←[34m←[1mwandb←[0m:" instead.
  5. go to https://wandb.ai/authorize and copy my key number
  6. press CTRL+V in the cmd. Nothing happens.
  7. press enter and this error raises:
Traceback (most recent call last):
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_init.py", line 686, in init
    wi.setup(kwargs)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_init.py", line 153, in setup
    wandb_login._login(anonymous=anonymous, force=force, _disable_warning=True)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_login.py", line 203, in _login
    wlogin.prompt_api_key()
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_login.py", line 138, in prompt_api_key
    key = apikey.prompt_api_key(
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\lib\apikey.py", line 136, in prompt_api_key
    write_key(settings, key, api=api)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\lib\apikey.py", line 221, in write_key
    raise ValueError("API key must be 40 characters long, yours was %s" % len(key))
ValueError: API key must be 40 characters long, yours was 1
wandb: ERROR Abnormal program exit
Traceback (most recent call last):
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_init.py", line 686, in init
    wi.setup(kwargs)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_init.py", line 153, in setup
    wandb_login._login(anonymous=anonymous, force=force, _disable_warning=True)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_login.py", line 203, in _login
    wlogin.prompt_api_key()
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_login.py", line 138, in prompt_api_key
    key = apikey.prompt_api_key(
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\lib\apikey.py", line 136, in prompt_api_key
    write_key(settings, key, api=api)
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\lib\apikey.py", line 221, in write_key
    raise ValueError("API key must be 40 characters long, yours was %s" % len(key))
ValueError: API key must be 40 characters long, yours was 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "train.py", line 522, in <module>
    train(hyp, opt, device, tb_writer, wandb)
  File "train.py", line 130, in train
    wandb_run = wandb.init(config=opt, resume="allow",
  File "C:\Users\sgsil\anaconda3\envs\yolov5_ts\lib\site-packages\wandb\sdk\wandb_init.py", line 726, in init
    six.raise_from(Exception("problem"), error_seen)
  File "<string>", line 3, in raise_from
Exception: problem
Internal process exited

Even if I want to write text manually when my keycode is asked I can't. I haven't tried updating the repo since yesterday though... should I try?

WARNING: code is out of date by 6 commits. Use 'git pull' to update or 'git clone https://github.com/ultralytics/yolov5' to download latest.

@AyushExel
Copy link
Contributor

@SebaSilvaS ctrl+V wont work on cmd. And when writing manually it wont show what you've written as it's treated as a secure password. Just copy the code and then right click on the cmd prompt and then click on paste. That should work

@SebaSilvaS
Copy link
Author

It worked! I just had to righ click. Even though nothing happened when I pressed enter, the code was right and no error raised.
Thanks a lot @AyushExel.

@nTnZone
Copy link

nTnZone commented Apr 27, 2021

Cheers, I'll test some more when I get the chance and report back

have you solved it? I met same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants