After activating the virtual environment, when I try:
$ sudo pip install -U nltk
it shows this message:
Requirement already up-to-date: nltk in /usr/local/lib/python2.7/dist-packages
Why isn't it downloading those packages? Should I use --no-site-packages while activating?
Wait, if you are inside the virtual environment, you shouldn't use sudo
.
In fact, using sudo
will spawn a new shell that may have different variables, and thus this sudo-shell will be outside the virtual environment. (Note: this paragraph is speculation; I have not tested it.)
Try again without sudo
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.