cant run python scripts without typing "python" in windows comand prompt after installing Enthought Canopy - enthought

I used to have Enthought EPD, and I upgraded to Enthought Canopy on windows 7. My python program my_program.py wont run without typing python ("python my_program.py") in the command prompt, where before the upgrade I could run in just by typing "my_program.py".
Thanks,
Ron

You have to write the below code in your script
#!/usr/bin/env python

Related

Syntax error while installing seaborn using conda

I've recently tried to install seaborn on ipython, which the latter was installed using anaconda. However, when I ran conda install seaborn, i was returned with a syntax error. I tried again with conda install -c anaconda seaborn=0.7.0 this time but syntax error was returned again. Apologies for my limited programming knowledge, but could anyone provide advice on how to resolve this issue?
conda is a command line tool, not a Python function. You should be typing these commands in a bash (or tcsh, etc.) shell, not in the IPython interpreter.

Can't get ipython console in spyder

I'm having trouble getting an ipython console in Spyder. It only offers a python interpreter under the "interpreters" menu.
I've seen this issue for a couple of others in Stackoverflow, but didn't have much joy with the proffered solutions.
I'm running linux Mint 16 and have installed both ipython (v 1.1.0) and Spyder (v 2.2.1) the easy way via the Mint Software Manager. I made sure that I also installed ipython-qtconsole and verified that I could run it from a terminal (i.e. ipython qtconsole).
I can activate an ipython console using the following commands in a Spyder python console:
import IPython
IPython.start_ipython()
though the font coloring is strange and doesn't work well on a white background (e.g. error messages in yellow and light green). It would be nice anyway to be able to start ipython the normal way from the Spyder menu.
You may want to install python-zmq for Python 2 and python3-zmq for Python 3.
I use Ubuntu 14.04, so:
sudo apt-get install python-zmq python3-zmq
I'm also using Linux Mint (18.1, at this time) and I have faced the same issue.
What solved this for me was installing Ipython3 Qt console (that, of course, should be Ipython Qt console if you're using Python 2.x).
In case you have it installed, check if you have the latest version
(In Linux Mint you can do this through Synaptic, aptitude or apt-get.)

Created an Anaconda python3 environment but it still loads ipython 2.7.6

So I installed Anaconda on my Ubuntu linux 12.04LTS x64 box. It seems to work fine except for this. So I created a conda environment using the
conda create -n py33dev python=3 anaconda
When I try to run the ipython shell, I would expect to get the Ipython3 shell and notebook. However, it still loads the ipython 2.7.6 shell. I tried using the ipython3 command, but it will then load an ipython3 shell from my computer and not from Anaconda.
I tried to install ipython3 to the Anaconda environment using
pip install ipython3
and
conda install ipython3
However, when I do this I just get a message saying "No packages found matching: ipython3"
So I am not sure why Anaconda runs fine with python2 but not with python3--even though Continuum indicates it is python3 ready. Am I missing a step anywhere? Does anyone know how to solve this?
Did you remember to do "source activate py33dev"?

Using ipython nbconvert with Enthought Canopy

I am using Enthought/Canopy (version 1.1.0.1371) and would like to use nbconvert to convert ipython notebooks to other formats. nbconvert has now been incorporated into ipython and is not available outside of ipython. However, it is apparently not available within the Canopy distribution. Any suggestions?
I believe it is available in the current version of canopy.
You can always install canopy package the old fashioned way with setup.py, just make sure you call Canopy's python. That way, you don't have to always wait for the package manager to incorporate changes to repos.
If canopy's python is your system python, merely python setup.py install should work. If you have multiple python paths, find Canopy's python; on my Ubuntu system it's:
~/Enthought/Canopy_64bit/User/bin/python
So I would just do:
~/Enthought/Canopy_64bit/User/bin/python setup.py install
1) Use the Canopy Package manager to update IPython to version 1.0
2) Open a Canopy User Python shell / terminal / command prompt. If you did not make Canopy your default Python, be sure to see this article: https://support.enthought.com/entries/23646538-Make-Canopy-User-Python-be-your-default-Python
3) ipython nbconvert ....
4) http://knowyourmeme.com/memes/profit

Cannot start Canopy's IPython from Windows command shell

I have been using EPD for some time and recently started using Canopy. So now I have both EPD and Canopy installed on my machine, which runs Windows 7 Pro x64. But I just realized I cannot launch Canopy's IPython interactive session (located in the directory C:\Users\User\AppData\Local\Enthought\Canopy\User\Scripts) in a Windows command prompt. I already added this directory to my Path before the EPD's python directory.
I checked out those files in the directory .../Canopy/User/Scripts/, I believe that problem is not with the file "ipython-script.py" there, but with the file "ipython.exe", which is what will be run when I simply type "ipython" in a Windows command shell (I set the path already).
In a Windows command shell, if I changed to the directory .../Canopy/User/Scripts/ and type up "python ipython-script.py", then I can correctly start the IPython session in the command shell. So, it looks like that "ipython.exe" does not run the script "ipython-script.py"...
Has anyone run into this same problem? Is there an easy fix?
P.S. I already had the latest Canopy (version 1.0.1.1160) installed.
Thanks for any help.
If you want to launch web interactive then the command
ipython notebook in windows shell or in canopy shell works.