I tried to install two package (orange3 and orange3-Associate) for python via jupyter notebook by running:
!pip install orange3
!pip install orange3-Associate
II can import and use the packages via the jupyter notebook however in anaconda navigator environments I can not see any of these packages while I have all other libraries like numpy, sklearn, etc. Is it a problem or an issue?
I found a solution on this blog (update: Wayne notes in a comment below that the blog is outdated and points to this Q&A instead). Importantly, you should differentiate between conda and pip.
As you mention anaconda, you probably should use conda to install:
# Install a conda package in the current Jupyter kernel
%conda install <dependency_name>
Alternatively, if you need to use pip:
# Install a pip package in the current Jupyter kernel
%pip install <python_package_name>
Related
I have installed kmapper since command prompt, but when I import kmapper in jupyter notebook
is visualized a error: No module named kmapper.
What can I do?
I should install kmapper, please help me.
I don't see a Conda version for this in a major Anaconda Cloud channel. Install with pip.
conda create -n my_kmapper_env python pip numpy matplotlib scikit-learn bokeh pillow
conda activate my_kmapper_env
pip install kmapper
How to install geopandas, I really tried everything and I still has error: ModuleNotFoundError: No module named 'geopandas'. I have the latest version of Python 3.9.6. I use Windows 10, I use Anaconda Prompt, I have only one version of Python.
I do not want to create other environment, I want to install it as any other package, how to do it? I tried:
pip install geopandas
conda install --channel conda-forge geopandas
!conda install geopandas
I checked also this page: https://geopandas.readthedocs.io/en/latest/getting_started/install.html to find solution but I still do not have this package. But package folium was installed correctly by pip install folium.
Help me because I try to do in second day in a row ;/
I will transcribe here the solution I found; all glory goes to Mr. Tanish Gupta, long life to him. Source here :). I hope it helps!
I did this in my win10 PC, I have Anaconda 2.1.4 and only the Python version which comes with it (3.7 I believe). I use Anaconda Prompt, I have only that one version of Python ('cause I had the latest Py ver, but outside Anaconda, and tried this. It worked, but for that 3.10 Python version, not for the Jupyter Py ver, if that makes sense).
To my understanding, probably there is some incompatibility between the libraries installed in the base environment, so we'll be creating a new one.
In the Anaconda command prompt, create a new environment variable:
conda create -n geo_env
Activate this environment “geo_env”, then add and set conda-forge channel:
conda create -n geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
Install Geopandas in the environment just created:
conda install geopandas
Next install Jupyter notebook in this environment:
conda install jupyter notebook
Note: If the above command doesn’t work for you, try conda install notebook.
Now add our environment to Jupyter notebook:
python -m ipykernel install --name geo_env
Change to our new environment in the AnacondaNavigator. Enjoy :D
In my case, then I had issues with seaborn and wordcloud in this environment, so I tried installing C++, 'cause it said in the error output, you know, I just wanted more headaches (it didn't work). Finally I installed them in the same way explained before and everything ran smoothly.
If I'm not mistaken you're either having a conflict between channels or you forgot to install geopandas packages when doing it with pip.
First of all, in an anaconda prompt, start by cleaning your environment by removing the packages that got installed by pip.
To do so just pip uninstall geopandas fiona pyproj rtree shapely.
Once you're done with that, run a conda install --channel conda-forge geopandas (normally should work).
How can I install geo pandas in Jupyter Notebook?
I have the latest version of Python - 3.9.6 and I know that I need to download fiona or something like this but I have huge problem to do that because when I try: pip install geopandas I have an error.
I know that on stack there are many questions about that but on this page is Fiona only for python 3.7: https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona
Could you write me step by step how to install geopandas on Jupyter Notebook ?
Setting up geopandas is a bit tricky. There are lots of dependencies which some of them require building if you use pip.
The best and easiest solution I suggest is using Miniconda or Anaconda to install geopandas.
Just install Miniconda from: https://docs.conda.io/en/latest/miniconda.html
Then open miniconda prompt. In the command line create a new environment:
conda create --name gis python==3.9.6
After installation you need to activate your environment. The name of the enviroment as you can see in the command is gis:
conda activate gis
Then we need to install your packages:
conda install -c conda-forge geopandas jupyterlab
Using conda-forge gives you the latest version. This will install all required packages at ones. It will also install jupyter lab.
To run the jupyter lab at your directory run the Miniconda prompt and change the directory:
cd <path to your directory>
The activate your environment:
activate gis
And run jupyter lab:
jupyter lab
Then you should see the ipykernel start and jupyter lab will show up in your default browser. The home directory of jupyter will be the one you set.
Alternatives to Conda:
If you want to use pip only you can install pipwin so it will get the wheel from https://www.lfd.uci.edu/~gohlke/pythonlibs/
Also you can download wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/ yourself and install the package by using this command in your active environment:
pip install <path to the downloaded wheel>
you can see all required packages from here:
https://geopandas.org/getting_started/install.html
I am trying to install 2 python packages on Anaconda Jupyter Notebook. The links to the python packages are as follow:
1) https://iapws.readthedocs.io/en/latest/modules.html
2) https://pythonhosted.org/thermopy/iapws.html#module-thermopy.iapws
But I am getting the following error on both installations. Can anyone tell me what is wrong?
Through Anaconda you should write this on your Jupyter notebook :
# Install a conda package in the current Jupyter kernel
import sys
!conda install --yes --prefix {sys.prefix} packagename
With a normal install of python you should write this on your Jupyter notebook :
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install packagename
By replacing packagename with the name of your package like numpy.
Cheers
Your Jupyter notebook server does not have access to internet. You operating system might have a firewall or limit internet access to third party applications, especially since this is a work laptop.
Regardless, it is easy to install components using pip. If you cannot access the internet from inside the notebook, try opening a Command Prompt as admin and simply type pip install iapws.
I know that there exists a link for installing Tensorflow for python 3.5 on
Windows Installation link. There also a similar question on StackOverflow link also, but it case when I use this command:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
But it said Wheel package needs to be updated. So I updated it using pip and ran the application once again. The output was
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.
So how do I solve this problem ? Please help.
I've tried to install the cpu version of TensorFlow.
conda upgrade conda
conda upgrade --all
conda create -n tensorflow python=3.5.
activate tensorflow
conda install -c conda-forge tensorflow
This will create an "environment" that will contain all of your packages you need (the example above is just tensorflow) and you will be able to import that library while you are in that environment anaconda is really just used to manage packages and segregate projects that require different packages
When your finished with your environment, to close out use:
deactivate
these commands are slightly different on OSX/Linux so be sure to look them up if you are on a different operating system
If you are using TF for some machine learning then you will probably want these packages in your environment as well:
conda install pandas matplotlib jupyter notebook scipy scikit-learn
Place that line between (activate tensorflow) and (conda install)
The executable, Anaconda for python 3.5 is not available on the official website.
An alternative to downloading that version is to download the latest version of Anaconda(3.6 as of 9 May, 2017), open your cmd shell in windows and execute the following commands. Note that the activate command is not fully supported in Windows Powershell. Click here to see why.
conda create --name tensorflow python=3.5
activate tensorflow
conda install -c conda-forge tensorflow=1.0.0
The answer has been borrowed from Anaconda Public Google Group.