Created an Anaconda python3 environment but it still loads ipython 2.7.6 - ipython

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"?

Related

Jupyter Notebook Error: "Jupyter command `jupyter-notebook` not found."

I just downloaded vscode using homebrew and install python#3.11 using homebrew as well. I used pip3 install jupyter as I saw other recommend to fix this issue and still no luck. I have downloaded all the extensions on vscode and I have set the kernal to homebrew version of python and I still recieve this issue. Note that I have used notebooks in the past and have never gotten this issue so I am not really sure what it is this time. I have not installed anaconda.
I have tried uninstalling and installing the extensions but no luck. I have tried to pip3 uninstall jupyter, pip3 uninstall notebook and reinstall them and still no luck. I have tried to change the kernal to the default python3 on the mac and still nothing. My mac is m1 running on Ventura 13.2. I am able to run python code on regular python files just not using jupyter notebook. I followed the instructions how to set it up on vscode website but I got this error. Any help would be appreciated thank you.
I have same issue using VSCode on Mac OS.
VSCode's 'Jupyter' plugin is broken, causing VSCode unable to bind with python interpreter. Downgrading from v2023.1.2000312134 to v2022.11.1003412109 fixed my issue.
I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
Form your VSCode Command Palette (Shift+Command+P), search and then choose
Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).

Not able to install feature -Engine Module

I am trying to install feature-engine module on anaconda
this is the error i am getting
Package is not available from current channels
repo.anaconda win 64 , noarch etc.
Can you please help me with the problem?
Thanks,
RD
to install from anaconda:
conda install -c conda-forge feature_engine
I believe that feature-engine is not available through anaconda channels for installation with conda install. I was able to install it via pip. Here is how I did it (in Windows):
open a CMD and run conda activate <<VIRTUALENV>>. This is the environment you create for your project. If you have not created one, then use base, the default one.
cd to the location of your pip installation within that activated conda Virtual environment (mine was within my user folder in \AppData\Local\Continuum\anaconda3\envs\<<VIRTUALENV>>\Scripts).
in there, run pip install feature-engine
you should now be able to see it listed under pip freeze or pip list, but not under conda list.
Finally, go to your code location and run the code. remember to activate that same <> each time you open a new CMD to run it.
Hope it helps.
If you are using Jupyter Notebooks, it might be the case that your Jupyter Notebook is not actually running the kernel in your (activated!) Anaconda environment (via this answer), but the generic Python3 kernel that only can import packages from your global Anaconda environment.
You can check for this by importing a package that is installed in your global environment (e.g., pandas), while running a notebook:
import pandas
pandas.__file__
If you see something likes this (on Windows), you are indeed running the wrong kernel (as you would expect the packages to be loaded from the activated environments):
'C:\\Users\\<user>\\Anaconda3\\lib\\site-packages\\pandas\\__init__.py'
Therefore, in your Anaconda Prompt, you have to create a new kernel within ipykernel (assuming cenv is your environment of interest):
$ conda activate cenv # . ./cenv/bin/activate in case of virtualenv
(cenv)$ conda install ipykernel
(cenv)$ ipython kernel install --user --name=<any_name_for_kernel>
(cenv)$ jupyter notebook
Now, in the restarted Jupyter Notebook you can change the kernel via the menu: Kernel > Change kernel > <any_name_for_kernel>
Importing the same package, like pandas, should show the following file path:
'C:\\Users\\<user>\\Anaconda3\\envs\\<cenv>\\lib\\site-packages\\pandas\\__init__.py'
and you should be able to import any package installed in that Anaconda environment.

How to run "sudo ipython notebook" in browser without using Anaconda "ipython notebook"?

I have two pythons installed on my ubuntu
sudo which python
which python(anaconda).
And both pythons have ipython installed in it. When I run ipython notebook (anaconda) it simply takes me to the browser and works perfectly. But, when I run it like sudo ipython notebook (calling from systems python) it gives me an error. I want run ipython in browser in both cases.
What I do:
Iresolved it using this command sudo apt-get install ipython-notebook. Actually sudo pip doesn't work i think. Therefore i tried that and installed ipython-notebook and then i tried "sudo ipyton notebook" and it worked! :

Add python 2.7 to ipython notebook (default python3)

I am having a really hard time adding python 2.7 as a kernel to my iphyton notebook. I have anaconda installed with a python environment called "python2." I can navigate to the environment folder and launch ipython (using python 2.7) in the script folder.
I have tried ipython kernelspec install-self using iphython.exe, however, it seems like ipython is not even a command in that window.
I tried it again in anaconda command window and it just install python3. Please help with precise steps.
Ok I got it. I had to:
Change my python.exe under envs to python2.exe. I also change pythonw to pythonw2.
Added Anacoda\envs\python2 folder that includes python2.exe and scripts to path variable
Then ran this command in Anaconda command window: python2 -m IPython kernelspec install-self
Then ipython kernelspec list to verify

Pycharm doesn't recognize ipython in virtualenv

I made a virtualenv based on Python3.2 and installed ipython 0.12 in it. Pycharm is supposed to recognize ipython automatically, but it doesn't:
Any clues?
I was having the same issue with PyCharm not recognizing my iPython install. I am running EPD 7.2.2 on OS X 10.7.3 with PyCharm 2.0.1, and using virtualenvwrapper.
The workaround that worked for me was to reinstall iPython after creating my virtualenv.
Try running this:
workon <myvirtualenv>
pip install --upgrade git+git://github.com/ipython/ipython.git
Then add your directory as a "Python Interpreter" in PyCharm, and setting the "Project Interpreter" to .
Curious to hear if that works for you too.
Cheers,
Nolan
In my Pycharm,I use the fellow:
workon flask
pip install ipython
and then in the Project Interpreter,you can see the package ipython v.2.3.1 display.