samedi 22 février 2020

import random using Miniconda3 provides error

I'm learning Python and have installed miniconda3 to manage virtualenvs and packages.

I'm attempting a simple command: import random

This results in the following error:

 import : The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the 
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ import random
+ ~~~~~~
    + CategoryInfo          : ObjectNotFound: (import:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

After searching through stackoverflow, reading Python/Anaconda documentation, it seems maybe my path is the problem however after reading Anaconda documentation it appears I should not override the standard path Anaconda provided during installation.

Thanks in advance for the help on this. Much appreciated.




Aucun commentaire:

Enregistrer un commentaire