I am new at this and I wonder why I cannot install or import geonamescache library in anaconda.
Apparently, I am the only one among my friends with this problem. Could you help me?
Thanks in advance.
Screenshot of error
If you're using conda you should make sure you jupyter notebook is either installed in the same conda environment containing geonamescache or has its kernel pointed to that environment. Check the output conda list in your activated environment for the said package. If you don't find it (I'm expecting you won't) it means pip3 installed geonamescache as a system wide package. You'll need to install it your activated environment using pip install geonamescache. Try not to use the pip3 command in conda environments.
Not sure what OS and version of Anaconda you are using, so I can't be very specific.
According to the official list of packages for the distribution of Anaconda 3.7 for Mac OS(I am currently using it), there are currently 657 packages supported by anaconda(For Windows that number stands at around 620 at the moment). Here is the full list for up-to-date distributions.
I have looked into geonamescache, and it looks like it might not be supported by Anaconda at all. I suggest you looking into installing it via Pip(keep in mind that I would do that only if necessary as it is better to avoid using Pip with Conda that much). Look at this answer if interested.
Related
I have tried many times to install Pipetorch in Spyder 5.3 with Python 3.8.10, but it failed.
I have tried as well conda as pip commands, but it does not work. If I use %pip I get this:
Note: you may need to restart the kernel to use updated packages. C:\Users\szewa\AppData\Local\Programs\Spyder\Python\python.exe: No module named pip
If I use conda I get this:
`ValueError: The python kernel does not appear to be a conda environment. Please use ``%pip install instead.`
Can someone help me? I can find nothing on internet that works...
You seem to be confused about the differences between pip and conda. Anyhow, your Python installation is messed up now and only a restart will help now.
The easiest way to use Python together with the Spyder IDE is to install Anaconda and learn some conda basics: Getting started with conda.
If you really want to install Spyder with standard Python, follow the recipe from Spyder installation without Anaconda, but it seems to be tricky.
I am trying to install OSMNX module in Pycharm (using Python 3.7.2).
I tried installing it using pip install osmnx but got the following error[![error][1]][1]
i have also tried using .whl files from [https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona][2] but I cannot identify how/what steps to follow. Please provide some clear steps!
Most of the other question are answered w.r.t. conda environment. I have to use Pcharm only.
Input in any form is highly appreciated!
[1]: https://i.stack.imgur.com/RdJDN.png
[2]: https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona
You said:
I have to use Pcharm only.
Does that mean you cannot use conda + pycharm on your system for some reason? If you can, then:
Install OSMnx with conda
Use Conda environment in pycharm
This is by far the easiest (and recommended) solution.
If you cannot, then you must manually install the dependencies. This is a nontrivial process, especially if you're on Windows. OSMnx itself is pure Python and its installation is simple, but its dependencies have C extensions that require compilation.
You can see OSMnx's dependencies here and you'll have to install them one at a time. All of the tricky dependencies are brought in via geopandas, and you can read more about its installation details and dependencies here.
I'm trying to install a python package directly from github. In my case that's SciANN. When I selected my environment in conda using conda activate myenv and afterwards install this package as explained in this post using the following lines of code:
conda install git pip
pip install git+git://github.com/sciann/sciann.git
it is successfully installed and I get the message "Successfully built SciANN" in the end of the insatllation procedure. When I then open spyder and type import sciann I get the error ModuleNotFoundError: No module named 'sciann'. I also tried to use pip3 instead of pip but this did not change something.
Have I missed something? Is this package now installed correctly into my environment myenv?
The deleted answer from Jay Prakash together with the comments brought me on track. Yes there can be different versions of packages installed. So in my case SciANN was installed using pip as they currently do not offer a conda installation while all my other packages where installed with conda. I ended up having two different versions of tensorflow installed, one from pip and one from conda so I deleted one. Additionally I used Python version 3.7 while this package supports only up to 3.6. And I had to use a non official tensorflow version because my CPU does not support AVX which is a whole new topic.
As I already have quite a lot of packages installed without installing Anaconda will I have to reinstall them again separately? Or are they accessible in Anaconda environment because I have them preinstalled? There is a similar question which has the answer suggesting installing only miniconda but in my case Anaconda is necessary.
No, anaconda uses completely different environments and whatever downgrading it does, it does it within it's own environments. So, if you are using anaconda environments within your applications, you don't need to reinstall anything but if you are using another environment (like pip only) you need to make sure you have installed all the necessary packages there as well.
Also, if a package is installed using pip and not installed in conda, it will automatically switch to pip so there is no problem there.
I have a simple question. I have install resampy using anaconda
conda install -c conda-forge resampy
Now when I import resampy into my python program, it still returns the error saying Import Error: No module named resampy
But conda says it is installed. Can someone help me out where I'm doing something wrong?
The major confusion that I come across is: When I install a package using anaconda, does it install just like any other package installed via pip? Can I import and use it just like any other package?
Please someone help me out of this.
I have the same experience, somehow in the PATHs that Anaconda created, it does not include the full path to the package installed via conda install.
As workaround, i use:
import sys
sys.append(full path to the site-package directory)
in my case:
sys.path.append("C:/Users/rpo/AppData/Local/conda/conda/envs/tweet/Lib/site-packages/")
I experienced this for one package in both linux and windows conda environment, i guess could be package specific issue.
I guess the best way to manage packages be it anaconda or plain python is to first create a virtual environment. Thereafter, all packages you install will be available to you when you activate this environment. Managing Python in this way keeps things easy and savvy and allows you to work with several versions of Python if you require.
Create a virtual environment
Specifying the version is optional.
conda create -n [env_name] python=[python_version]
Activate the virtual environment
source activate [env_name]
Install all your packages
You can now install either packages from anaconda. They will all be installed.
conda install [package_name(in this case resampy)]
And for the rest of your questions refer this:
What is the difference between pip and conda?
For more on managing environment refer this:
https://conda.io/docs/using/envs.html#