Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

No module named 'ddt'

v
vincent77 (320 points)
1 6 7
in Es1 by (320 points)
closed by

Ragazzi,

nel lanciare il comando di test01 dal prompt ANACONDa: pytest test_01.py -v --timeout 1 --durations 0, riscontro l'errore sotto descritto

Premetto che come ho fatto le installazioni e aggiornamenti del sw con i comandi descritti sul prompt ANACONDA:

conda update --all aggiornamento librerie

conda install -c conda-forge ddt

conda install pytest-timeout

=================================== ERRORS ====================================
_________________________ ERROR collecting test_01.py _________________________
ImportError while importing test module 'C:\Users\xxxxxxx\.spyder-py3\homework01\test_01.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_01.py:6: in <module>
    from ddt import file_data, ddt, data, unpack
E   ModuleNotFoundError: No module named 'ddt'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.13 seconds ===========================

1.6k views
closed with the note: deadline passed

1 Answer

andrea.sterbini (207920 points)
750 1267 2373
by (208k points)
Quando hai installato Anaconda l'hai messo in una directory che contiene spazi?

Perchè hai scompattato l'homework nella directory .spyder-py3 ?
L
Lorian (140 points)
0 1 5
by (140 points)
Ho lo stessp problema. Nel caso servisse, il mio Anaconda è installato nel percorso C:\Users\keray\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64-bit);

Come risolvo?
m
m.santoru (390 points)
0 0 4
by (390 points)
a me ha dato lo stesso problema quando ho cambiato pc, ho risolto facendo "run as administrator" di anaconda prompt e rilanciando i comandi d' installazione sempre da anaconda prompt