How do I create a Python 3.3 environment with Anaconda (& Windows)
Solution 1
I would try:
$ conda create -p path\to\your\virtualenv python=3.3 nameOfVirtualenv
Solution 2
This has been cleaned up a bit. You can now do:
conda update conda
conda create -n py33 python=3.3 anaconda
activate py33
Unfortunately scitools fails to build still, are you sure it's python 3 compatible?
Solution 3
You can also use the anaconda Navigator. It is installed by default with recent enough Anaconda installer.
In the Environments
tab, you click on Create
button and you set the name and the Python version you want to use:
From this menu, you can also launch the terminal, a Python command line, an IPython command line and the Jupyther notebook, all with the environment you choose:
I think it's what you where missing: stating Python with the new environment.
You can do the same with command line, but for the usage you described this graphical way may suit you better.
Related videos on Youtube
Stefan Smith
Updated on September 18, 2022Comments
-
Stefan Smith over 1 year
I installed Anaconda on my Windows XP machine about a week ago. It came with Python 2.7.
I am trying to create a Python 3.3 environment on it. I followed these directions, resulting in downloading a bunch of stuff, with no error messages.
The instructions said I had to change my path, but they did not say how. There are new folders called
I:\Python33
andI:\Anaconda\envs\py33
on my PC. I addedI:\Python33
to myPATH
.I shut down and restarted Anaconda several times. I cannot get
import scitools.pprint2
to work in a Python interpreter (I think I need Python 3.3 for this).I get this error:
Traceback (most recent call last): File "<ipython-input-2-8852894fb85d>", line 1, in <module> import scitools.pprint2 ImportError: No module named scitools.pprint2
How should I troubleshoot this error?
-
Raystafarian almost 11 yearsWould that be in place of a certain line or would it be on its own?
-
Adobe almost 11 yearsThe is a command to be run from terminal (cmd). Or did I get You wrong?
-
Raystafarian almost 11 yearsNo, it's not my question, I was just asking for some clarification on the answer
-
Adobe almost 11 yearsI expect it to be a clean new anaconda virtualenv with python3.3.
-
Adobe almost 11 years@StefanSmith: I thought there should be the name of the virtualenv at the end. Looks like it doesn't. Can You remove that and try again?
-
Stefan Smith almost 11 years@Adobe : Thanks again. I entered " conda create -p path\to\your\virtualenv python=3.3 " at the command line. Then I got a response that python-3.3.2 would be linked, then "Linking packages...", then "COMPLETE". No error messages. Then I launched Anaconda. I entered " import scitools.pprint2 " at an IPython console. I got the same error message that I reported in my original question.
-
Stefan Smith almost 11 years@Adobe : The reason I am trying to get Python 3.3 to work is that I thought I needed it to get "import scitools.pprint2" to work. Is that premise correct? If not, can you suggest a possible way to get "import scitools.pprint2" to work?
-
Adobe almost 11 yearsYou have to import
scitools
first:import scitools
. After that You'll be able toimport scitools.pprint2
. And I don't think python3.3 was a prerequisite for this. -
Stefan Smith almost 11 years@Adobe : I ended up uninstalling Anaconda, installing Python 3.3 from the main Python site, and installing Scitools separately.
-
Stefan Smith over 10 yearsThanks. I haven't really done anything with Python in a long time. Matlab, Octave, and Maple seem to do everything I need. A previous commenter recommended against using anaconda until I'd mastered basic python. I'm a math person, not a computer person, and unfortunately it seem difficult for a non-computer type to install and use a really good GUI for Python, let alone decide which one to use. Eventually, if I move to a "real" language, I would like to use Python.
-
aterrel over 10 yearsI think those are all great systems. If you do plan on using Python, I actually disagree with your commenter. Anaconda will use all the tools needed to get started (just like Matlab and others). It includes the excellent Spyder GUI. Good luck!
-
Wai Yip Tung over 10 yearsI have done this successfully. One tips, download miniconda instead of Anaconda. Since we are going to setup all 3.3 Anaconda packages, there is no point in installing the 2.7 anaconda, which takes 1.5 GB disc space. miniconda includes only the base Python and you can install your choice of packages later.