ImportError: No module named adversarial
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.
Hi Soloman1588, I am having the issue. Did you figure out what the problem was?
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.
@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 ?
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 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?