0

this is what the cmd shows:

C:\Users\74713\Documents>activate root

(root) C:\Users\74713\Documents>python
Python 3.6.2 |Anaconda custom (64-bit)| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

this is what my IDE shows:

Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 6.1.0 -- An enhanced Interactive Python.

the first one's version is 3.6.2 while the second one is 3.6.3

and because of that, I meet trouble in import torchtext, which works well in the cmd(3.6.2) while fails in my IDE(3.6.3)

Eli Korvigo
  • 10,265
  • 6
  • 47
  • 73
  • 1
    Instead of posting pictures I would recommend you to copy and paste the messages from your console here – Absent Apr 23 '18 at 08:07
  • @Wang It obviously is the problem of ipython, check out this post to fix you problem: https://stackoverflow.com/questions/9386048/ipython-reads-wrong-python-version?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Carole Apr 23 '18 at 09:13
  • You mean the version of python should still be 3.6.2? – Wang Yifeng Apr 24 '18 at 08:35
  • Please do not post terminal output in images. Please see here for why: https://unix.meta.stackexchange.com/q/4086/40481 – darthbith Apr 24 '18 at 13:29
  • Noted! Thanks so much! I copy the information of cmd and IDE now – Wang Yifeng Apr 24 '18 at 16:36
  • As I understand your question, you do have 2 Python versions. `Python-3.6.2` and `Python-3.6.3`. For one version you can install `torchtext` and for the other it fails. I'm not using Anaconda, so I have limited experience there. But obviously you have two distinct versions of Python. One has `torchtext` installed, the other not. So you can go different ways. You can install `torchtext` in the Python version, where it is missing (`3.6.3`). You can delete your Python `3.6.3.`, or you can tell your IDE to use Python `3.6.2.` instead of `3.6.3.` – MBT Apr 30 '18 at 12:36
  • Please, post the output of `import sys; sys.executable` from both `ipython` and `python`. Most likely, `ipython` is not installed under the `root` environment. – Eli Korvigo Apr 30 '18 at 12:52

0 Answers0