Installing Fiona on python virtualenv using Windows - python-3.x

I created a virtual environment of python on my Windows computer. I successfully downloaded GDAL 2.4.1 and linked it to python, I am trying to install Fiona using
pip install fiona
but I get this:
ERROR: Complete output from command python setup.py egg_info:
ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in
C:\Users\marcb\AppData\Local\Temp\pip-install-dua0wlxg\fiona\
Any thoughts on what to do? I need to use the virtualenv and not conda (I already have it successfully installed on anaconda)

Related

Install geopandas in Pycharm

Sorry if this is a repeat question, But I am new to Python and trying to install Geopandas in Pycharm.
My python version is 3.7.2.
I have tried the conventional way of installing library in pycharm through project interpretor.
I have also tried pip install geopandas
Both show same error.
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output
Please provide steps to follow wrt Pycharm if possible.
According to Geopandas's own install instructions, the recommended way is to install via conda package manager, which you can obtain by using the Anaconda or miniconda Python distributions:
conda install geopandas
If, however, you have a Very Good Reason you can't use conda, and absolutely need to use pip, you should try installing GDAL first (pip install GDAL), and then checking if the gdal-config command is in your path (i.e. that you can access it via the terminal). Then you can try installing again from either PyCharm directly or via the command line.
If you can't get it installed from PyCharm and need to specify GDAL_VERSION (which you can get with gdal-config --version), you'll probably need to install from the command line, where you can set this variable either with an export or directly in the same invocation:
GDAL_VERSION=2.4.2 pip install geopandas

How to fix: PyInstaller in MSYS2 MinGW 'Your platform is not yet supported'

I'm trying to package my GTK3+ Python 3 script using PyInstaller on Windows 10.
GTK3+ and the Python bindings are installed and working, using MSYS2 MinGW as per the GTK+ instructions.
In MSYS2 MinGW, when I type:
pip3 install pyinstaller
I get the error: Your platform is not yet supported. Please define constant PYDYLIB_NAMES for your platform.
So I attempted to install PyInstaller manually from Windows PowerShell by downloading and extracting the tar.gz file for PyInstaller and then running:
python3 setup.py install
But with that, I get "ModuleNotFoundError: No module named 'setuptools'".
How can I install PyInstaller in MinGW, for use on a GTK3+ Python3 script?
You can download setuptools from PyPI and install manually with python setup.py install. Then repeat what you have done.
With PyInstaller 3.6, you should no longer be getting the Your platform is not supported errors when trying to pip install it in MSYS2.

Python 3 - WinError 87 when installing new modules

I'm trying to install new modules in python 3 and when I run python -m pip install filename on my win10 machine then I'm getting:
Using cached https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Error [WinError 87] The parameter is incorrect while executing command python setup.py egg_info
Could not install packages due to an EnvironmentError: [WinError 87] The parameter is incorrect
I tried to run PowerShell as an admin but the problem persists. I also tried to run this command in the cmd.
I received the same error message when executing a pip install numwords2 from the Pycharm console.
I then upgraded pip, using:
python -m pip install --upgrade pip
which uninstalled pip-19.1.1 and replaced it with pip-19.3.1.
The next whack at pip install worked well.
termcolor is quite old, the last release 1.1.0 was in 2011. There is a report that Python 3.6+ broke termcolor.
My recommendation is to try console.

Unable to install xgboost Python 3 Mac

I am facing issues while installing xgboost on MacOS 10.10.5. I am using Python 3.6.3. I already tried pip install xgboost but received following error:
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/tz/42d7kx0j74jf6j2qqczg6cqm0000gn/T/pip-build-58t0kofo/xgboost/
Am I doing anything wrong?
Not sure what the problem was initially but I found a workaround to my problem. Following line works like a charm! However, You need package manager Anaconda.
conda install -c conda-forge xgboost

Can't install mercurial package with pip under python-3.2

I try to install mercurial with pip package manager with command:
pip.exe install mercurial -I --install-option="--c2to3"
and get such error:
Downloading/unpacking mercurial
Running setup.py egg_info for package mercurial
setup.py with python3 needs --c2to3 (experimental)
Complete output from command python setup.py egg_info:
setup.py with python3 needs --c2to3 (experimental)
----------------------------------------
Command python setup.py egg_info failed with error code 1
How to pass "--c2to3" option to setup.py correctly via pip options?
System: Server2008R2 SP1, python-3.2.3(AMD64)
Mercurial isn't supported on Python 3.x. Install it under Python 2.7 (unless you want to help port it)

Resources