adversarial icon indicating copy to clipboard operation
adversarial copied to clipboard

ImportError: No module named adversarial

Open Solomon1588 opened this issue 9 years ago • 5 comments

Hello,I attempt to reproduce your adversarial net , but there is something wrong as the tittle mentioned. I noticed that I should set the "adversarial" directory in my PYTHONPATH environment variable.
I am puzzled,however ,what does the "adversarial" directory meani? I tried to set directory of the project into the PYTHONPATH but failed with the "ImportError: No module named adversarial". I wish you could Solve my doubts.Thanks a lot.

Solomon1588 avatar Jun 15 '16 09:06 Solomon1588

Hi Soloman1588, I am having the issue. Did you figure out what the problem was?

sbanerj1 avatar Jul 08 '16 20:07 sbanerj1

You should set your PYTHONPATH environment variable to be equal to the directory that contains your cloned version of this repo. For instance, if you cloned this repo into a folder called "git", then in your .bashrc file: export PYTHONPATH=$HOME/git.

The PYTHONPATH variable tells python where to look for modules (aside from the default locations). By setting it to the parent directory of this repo, it will find the "adversarial" folder and look within it for the module files.

zjost avatar Dec 13 '16 23:12 zjost

@Solomon1588 did you solve the problem?I'm having the issue too. @zjost It's comes "No module named adversarial" after I add the PYTHONPATH in .bashrc.what should i do ?

shilaimu avatar Mar 24 '18 14:03 shilaimu

This question is better for Stack Overflow, as it isn't specific to this code, it is a general Python question. To make sure your changes took effect, you can echo $PYTHONPATH and verify it is as expected. If it's still not there, perhaps you forgot to actually run your .bashrc. You can either log off and on again or simply source ~/.bashrc.

zjost avatar Mar 24 '18 17:03 zjost

@zjost thank you very much,I imported the adversarial in python ,but there's output "warnings.warn(warn)" how should I config the path of the mnist or other datasets?

shilaimu avatar Mar 25 '18 13:03 shilaimu