How to install osmnx in Pycharm - python

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.

Related

Is there a way to use RDKit without Anaconda or Conda?

RDKit is a Python library for chemistry. I don't want to use an Anaconda distribution, and I am not sure (from the documentation: https://www.rdkit.org/docs/Install.html ) if there is a way to use the package without it. Can someone give me some pointers on installing and using this without conda or installing an Anaconda distribution?
The documentation does provide directions for installing from alternative repositories (e.g, homebrew) or building from source.
Nevertheless, Conda is the simplest path, and just because you don't want Anaconda (neither do I!), that shouldn't deter you from enjoying the benefits of deep dependency management that Conda provides. There are minimal and performant distributions, like Mambaforge, that users only focused on environment and package management often find preferable. Also, don’t use the base environment for work, but create a new one, like
mamba create -n rdkit rdkit
I just installed rdkit and then installed jupyter (without anaconda), and it is working. It works in PyCharm too, but I'm not able to display images of molecules as SVG files.

Geonamescache installation in anaconda

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.

Can all 'pip' packages be installed through 'conda install' command?

I'm using a station without admin rights and without pip. I need to use PyCharm (already installed) so as a workaround I installed Anaconda Navigator (doesn't require admin) and am using an environment in Anaconda as my interpreter in PyCharm.
I'm a bit confused regarding the conda install and the packages offered there. Are they all the same as the ones offered by the Python Package Index? Do developers only upload their work once to pypi.org and then it appears on both pip and conda installations or does it not include every single python package out there?
Thanks and I apologize if the question doesn't belong to this section of stack exchange.
First here is a link to an anther great post with a similar question: What is the difference between pip and conda?
But here is a response from my point of view and understanding:
Pip libraries specifically focus on packages related to the python. Conda uses those too, however, it also provides packages not related to python.
The best package example available is HDF5 it was not originally integrated into pip and Conda had their own hdf5 package. Pip has a similar package called h5py.
Also, conda's virtualization environments are what so appealing about it. In a way, Conda is like Docker.
Conda Hdf5: https://anaconda.org/anaconda/hdf5
Pip h5py: https://pypi.org/project/h5py/
Conda Cloud has the ability to read the PyPi libraries index, so it will be aware of newly uploaded packages.
Sorry if my response was not clear enough! English is not my first language, plus I was in the same boat as you a year ago.

Is it possible to use custom build cpython in Anaconda environment?

I build a cpython locally (Windows) with a fix to a problem with multiprocessing that I have, but I also need data science stack of packages like numpy, pandas, scipy, matplotlib, statsmodels and few others. When I try to install them the process appears quite cubersome for many packages and for scipy I wasn't able to resolve it after 3 days of trying.
I was thinking that it would be amazing if I can just replace python in my anaconda env, and use conda to install the packages I need. Is it possible to easily replace python with binaries I have or I need to wait while my fix is released with new Python version?
I was able to resolve my issue by replacing only python DLL that I had in, and the conda environment just worked with it

Automatically installing Python dependencies using CMake

I've had a quick look around, but because of terminology like dependencies and packages being used in different ways, it's quite tricky to pin down an answer.
I'm building a mixed-language source (Fortran, some C and Python) and the Fortran calls a Python script which depends on the networkx Python package in the PyPI. Normally, I just have networkx installed anyway, so it isn't a problem for me when rebuilding.
However, for distribution, I want the best way to:
Install pip or equivalent, if it is not installed.
Possibly install virtualenv and create a virtual environment, if appropriate.
Download and install networkx using the --user option with pip.
Is there a standard way? Or should I just use CMake dependencies with custom commands that install pip etc.?
it depends. for "manual" install, you definitely should detect if all required (to build) tools are installed, and issue an error if they don't. then use execute_process() to run pip and whatever you want.
from other side, if you are going to produce a real package for some particular Linux, you just pack your binaries and require (via corresponding syntax of particular package format like *.rpm or *.deb that your package depends on some other packages. so, you can be sure that they will be installed w/ (or even before) your package.

Categories

Resources