I am new in python and I am trying to work with geopandas library. I have already installed the package using:
conda install -c conda-forge geopandas
but when I try to import the library, I get back:
ERROR SCREENSHOT
But searching in my computer directories I have already installed fiona and inside this directory, there is a file "_loading.py"
Isn't it strange that I have both packages installed and I have this error?
Thank you in advance
If you are using Jupyter Notebook or JupyterLab, you may just need to restart the kernel for the environment.
First, install python=3.7 then download the related library with the same version of python from here. https://www.lfd.uci.edu/~gohlke/pythonlibs.
install all of them using pip
Related
Did pip install pdfrw, uninstalled and reinstalled, restarted my laptop, but still unable to import the specified package as it returns error: No module named 'pdfrw'.
https://pypi.org/project/pdfrw/#pdfrw-philosophy
Any advice is appreciated.
Update: Tried installing by cmd, I'm using Jupyter Notebook as IDE :)
You have to make sure that the Python that you are using with Jupyter Notebook is the same that the one for which you are installing that package. If you have several Python interpreters installed or if you installed Ananconda to use Jupyter, you have to take care of which pip are you invoking from CMD.
If you are using Jupyter from Ananconda, try to install the package using conda.
conda install pdfrw
Another thing that you can do is open a Command Prompt and type:
where python
you will get the path to the interpreters that you have installed. In my case I get:
>>> C:\Windows\system32>where python
C:\Python39\python.exe
C:\Python38\python.exe
>>> C:\Windows\system32>where pip
C:\Python39\Scripts\pip.exe
C:\Python38\Scripts\pip.exe
Then you can use a concrete interpreter to call pip, in my case I will do:
C:\Python39\python.exe -m pip install pdfrw
After the installation finish, invoke the same interpreter you use to call pip:
C:\Python39\python.exe
Then try to import pdfrw. If you can import it, then the problem is that you are using a different interpreter in Jupyter Notebook.
I have installed lxml and pillow using pip install lxml and pip install pillow and cmd is showing that I have successfully installed lxml and pillow but on importing lxml and pillow in jupyter notebook, it is saying that library not found:
jupyter notebook:-
Please help me to resolve this issue.
This question is asked so often all the time. With variations in the use of PyCharm as well. My recommendation for using Jupyter Notebook is to install any package within the notebook itself. In your case, create a cell containing:
!pip install lxml
!pip install pillow
After the installation is complete, you can safely remove it. You only need to install them once. You see? As simple as that. So, you are no longer need to think of using a different environment. It's easier if you are still a beginner. Then start learning all about the Python environment: https://docs.python.org/3/tutorial/venv.html and of course, not forget to mention about operating system path in case you have multiple version of Python (from Anaconda, the Microsoft Store, and Python official installer).
I am using Python 3.8 on a Ubuntu 20.04 computer. So far, I had no problem importing packages from either Spyder of Jupyter.
I have created a conda virtual environment called theory using Python 3.6, as confirmed by running python --version from within this conda environment.
conda list reveals that numpy is installed:
numpy 1.19.4 pypi_0 pypi
Opening a Python interactive session from the terminal and importing numpy in there works like a charm.
However, when trying to import numpy from within Spyder, I am getting a "Module Not Found" error:
ModuleNotFoundError: No module named 'numpy'
Here is what I tried to fix this issue:
I tried uninstalling and reinstalling numpy using pip install numpy (and pip3 install numpy).
I tried updating conda following the answer provided in this GitHub post: conda update --prefix /home/sheldon/anaconda3 anaconda .
I tried specifying the path to the numpy package in the PYTHONPATH manager directly in Spyder, pointing to /home/sheldon/anaconda3/envs/
What am I doing wrong here?
EDIT: I checked that Numpy 1.9.4. actually supports Python 3.6
EDIT: Just recreated a new Python 3.6 environment from scratch and I can import numpy just fine...
can you please try this :
uninstall numpy with pip uninstall
and re install it with
conda install numpy
Not pip install..
I have recently installed Anaconda with Python 3.5 and all the rest. I come from R where I am used to install packages dynamically. I am trying to install a module called scitools through jupyter notebook. I would like to recreate this in jupyter. However, I don't know how to dynamically install packages (if it's possible). I would greatly appreciate your help. Thank you!
EDIT: I am trying to use conda as recommended by the community, but it's not working. I am using mac OSX
Check Jake Vander Plus Blog here to learn how to install a package with pip from Jupyter Notebook.
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install numpy
So if you have already done the install with anaconda, you may already have the module installed. In that case in your jupyter notebook after you have activated your kernel, you just need to make sure you execute the import statement.
import scitools
If you haven't installed that module yet, you can install it one of two ways. Both work from your command line or terminal.
pip install scitools
or since you have Anaconda
conda install scitools
and that should do it. Your import statement in your notebook when executed should correctly locate and enable the use of that module.
I had the same issue. It turns out if you open an anaconda window, which in Windows is accessible under the Anaconda drop down, it points to the correct location to install (or update) using pip.
Can you tell me how can I configure point cloud library to be used with anaconda, I have never used point cloud before. I have installed pcl1.6.0 all in one installer, openNI and PrimeSense. But even after this when I run my python code in anaconda it gives me the error:
ImportError: No module named pcl
Do I need to copy my pcl1.6.0 folder in the site-package folder if anaconda?
the code is here:
import pcl
p = pcl.PointCloud()
p.from_file("C:\Users\Kangkan\Desktop\ikea.png")
fil = p.make_statistical_outlier_filter()
fil.set_mean_k (50)
fil.set_std_dev_mul_thresh (1.0)
fil.filter().to_file("inliers.pcd")
You can try this:
conda install -c sirokujira python-pcl --channel conda-forge
Found solution on this website [https://anaconda.org/sirokujira/python-pcl] yesterday.
I am using Python 3.6 in Anaconda3 for Windows10(64).Hope this would be useful for you.
You could try:
conda install -c https://conda.anaconda.org/ccordoba12 python-pcl
This references wasn't available when you asked the question, but using it worked for me! https://anaconda.org/ccordoba12/python-pcl.
I am using windows and ran the conda install line with cygwin.