Geospatial Conda Environment Setup in Python - python

I just started a new job and I have to set up my geospatial environment in Windows (I was a mac user before). I am having trouble navigating around geopandas bug #830. Based on the comments for the bug, it looks like if I can downgrade pyproj to version 1.9.4 it will fix the issue. BUT, I cannot get 1.9.4 installed for one reason or another. I have tried the following without success:
conda install -c conda-forge pyproj==1.9.4
When I try this, it gets hung up in the "Solving Environment" stage.
I then tried this:
pip install pyproj==1.9.4
but, I get this error:
Collecting pyproj-1.9.4
Could not find a version that satisfies the requirement pyproj-1.9.4 (from
versions: )
No matching distribution found for pyproj-1.9.4
So, I tried downloading the tar file and doing the following:
pip install "C:\Users\myname\Downloads\pyproj-1.9.4.tar"
but got this error:
Could not install packages due to an EnvironmentError: [Errno 2] No such
file or directory: 'C:\Users\myname\Downloads\pyproj-1.9.4.tar'
I have actually done more than this (it has been a long 8 hours), but I am hoping that somebody smarter than I can put me out of my misery :-) I am using conda version 4.5.11 and python 3.5.6.
Thanks in advance for any help.

Related

Trying to install torch for unity mlagents in the virtual enveiroment

When i enter the command:
pip3 install torch~=1.7.1 -f https://download.pytorch.org/whl/torch_stable.html
just like the manual at
https://github.com/Unity-Technologies/ml-agents/blob/develop/docs/Installation.md
says, i get this error message:
ERROR: Could not find a version that satisfies the requirement torch~=1.7.1 (from versions: none)
ERROR: No matching distribution found for torch~=1.7.1
My pip is on version 23.0, python 3.11.1
I tried a bunch of different ways to do this, even from the torch website, but nothing seems to work, i still get the same error message.
~=1.7.1 means >= 1.7.1, == 1.7.*.
But as far as I can tell, the PyTorch releases in this version range do not support Python 3.11. You are probably following instructions that are quite old.
You would need to instruct pip to install newer releases of PyTorch. Or use an older Python version (probably 3.7 or 3.8 which are quite old and heave nearly reached end of life).

can't install pptk in python

I'm trying to install the pptk module in PyCharm for visualising 3D point clouds.
Initially I tried installing in PyCharm via File > Settings > Python Interpreter > Install > pptk
However, it couldn't be found and advised I use pip instead.
So on my command prompt I navigated to the folder containing Python 3.9 and tried pip install pptk
And I got the following error ERROR: Could not find a version that satisfies the requirement pptk (from versions: none) ERROR: No matching distribution found for pptk
I'm not sure what I'm doing wrong or why no version can be found? Am I missing something obvious in the installation?
According to the requirements by the pptk module, the minimum Python version required is 3.6. Judging by the fact that there's no distribution found for 3.9 I believe that it was missing a PyPi repo for it, therefore downgrading to Python 3.6 should fix the problem. Judging by your response to my comment, that did work.

'pip install pyeto' gives version and distribution error

I'm trying to install a package called pyeto. Their website (https://pyeto.readthedocs.io/en/latest/) does not mention any problems regarding the installation and I can't find any installation related problems of other users. I'm doubting what solution I should look for (I would appreciate it to not have to reinstall python). I'm running python version 3.6.8 and the errors are presented below.
If you have an idea on how to solve this issue please let me know. I'm not an expert on how python runs in the background and how packages are installed through pip. Thanks in advance! B.
ERROR: Could not find a version that satisfies the requirement pyeto (from versions: none)
ERROR: No matching distribution found for pyeto
EDIT: pip --version
pip 20.2.2 from c:\users\user\anaconda3\lib\site-packages\pip (python 3.6)
The author hasn't put it on pypi, so pip is treating it as an unknown package.
See https://github.com/woodcrafty/PyETo/issues/3
Check on the website on what version it is supported.

ERROR: No matching distribution found for opencv-contrib-python-nonfree

I am trying to install opencv nonfree on windows version to run the sift.
PS F:\DKE\CV\cvfinal> pip install opencv-contrib-python-nonfree
> ERROR: Could not find a version that satisfies the requirement opencv-contrib-python-nonfree (from versions: none)
> ERROR: No matching distribution found for opencv-contrib-python-nonfree`
can someone help me to install this .i don't want to use cmake to created the package because its giving me some other errors.I am using the python 3.8.2 64 bit version ith pip
pip 20.0.2 from C:\Users\DELL\Anaconda3\lib\site-packages\pip (python 3.6)
can some please help me
I was not able to use PYTHON on my computer but you can see the video.
C++: I have solved it by installing Cmake, and later using opencv_master and opencv_contrib_master. You have to install Cmake and add it to the Path directories on windows. Later you will have to add opencv_master to Cmake an configure it, check none error is matched, later you have to add opencv_contrib_master/include to EXTRA_MODULES, you have to choice NONFREE and WORLD option, configure and generate. Thats the most important, you can use the next video. It work for me, just remember to use the instrucctions above.
https://www.youtube.com/watch?v=_fqpYLM6SCw&t=312s

Need help installing fiona and geopandas for python in Windows 10 - getting can't load requested DLL error

I am trying to install fiona and geopandas for python on Windows 10 and keep running into an error "ERROR 1: Can't load requested DLL".
I know this question is similar to other questions that have been asked, but I have followed the steps in multiple answers and tutorials and still can't seem to get this to work.
The closest I got was using the steps outlined in this tutorial : https://geoffboeing.com/2014/09/using-geopandas-windows/
and are summarized as follows:
installed the .whl files for rtree, pyproj, shapely, gdal, geopandas, fiona from https://www.lfd.uci.edu/~gohlke/pythonlibs/
Rtree-0.8.3-cp37-cp37m-win_amd64.whl
pyproj-2.2.1-cp37-cp37m-win_amd64.whl
GDAL-3.0.0-cp37-cp37m-win_amd64.whl
geopandas-0.5.0-py2.py3-none-any.whl
Fiona-1.8.6-cp37-cp37m-win_amd64.whl
Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl
navigated to download folder and used pip install to install GDAL wheel
added the osgeo path to my windows user Path environment variable
used pip install to install remaining wheels (geopandas last), everything installed without errors
As a check, I ran gdalinfo --help-general and get the following output:
This is where I get the "ERROR 1: Can't load requested DLL:" error. It says it cannot find the specified module "ogr_FileGDB.dll". The weird thing is, that .dll is actually in the location that it is looking in???
Also, in python shell, when trying to import fiona or geopandas I get the following errors:
This is beyond my level of troubleshooting...would really appreciate if anyone could get this thing working for me!!!!
FYI - running Python 3.7.3, Windows 10, pip is updated.
Lastly and potentially important (not sure how it plays in?) I already have a GDAL_DATA system variable defined, and also (maybe incorrectly?) also tried adding the osgeo path to my system path variable:
I was using a GDAL version that was not compatible with Fiona and subsequently causing issues with geopandas.
I uninstalled GDAL 3 and installed GDAL 2.4.1 and it worked fine, as cgohlke suggested.
Install fiona with conda, then that will solve the GDAL problem. pip install geopandas should work after that.

Categories