i have dask, dask-core and dask geopandas installed as shown:
dask 2021.7.1 pyhd8ed1ab_0 conda-forge
dask-core 2021.7.1 pyhd8ed1ab_0 conda-forge
dask-geopandas 0.1.0a4 pypi_0 pypi
however, when importing I kept getting an error message :
"ModuleNotFoundError: No module named 'dask_geopandas'"
I wonder what has gone wrong with installation, thank you.
This could happen if pip install and conda install installed packages in different paths (this typically happens when the conda environment does not have its own pip).
A simple way out of this is to install everything with conda, so in this case you would run the following within your conda environment:
conda install -c conda-forge dask dask-geopandas
Alternatively, make sure that your conda environment has pip installed also and then run the pip within the conda environment:
conda install -c conda-forge dask pip
# if the conda environment is not activate, then activate it
# using: conda activate the_name_of_your_env
pip install dask-geopandas
In addition, there are specific instructions at https://geopandas.readthedocs.io/en/latest/getting_started/install.html#installing-with-pip about extra steps you may need to take when using pip - you might need a compiler available in your system.
Related
Am I doing something wrong in my commands? I can't remove Keras.
$ conda remove --name myEnv keras
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are missing from the target environment:
- keras
$ conda list --name myEnv keras
# packages in environment at /Users/me/anaconda3/envs/myEnv:
#
# Name Version Build Channel
keras 2.3.1 pypi_0 pypi
The channel pypi for keras means you have mix used pip and conda. To uninstall the keras installed from pypi, use pip.
pip uninstall keras
It's not a good idea to mix use both package managers pip and conda in one environment. If you really need to. Read the official guide Using Pip in a Conda Environment.
conda remove --force (the rest of the command)
Pip Interoperability
As #Simba correctly identified, the package is from PyPI (i.e., it was installed via pip). By default, Conda can recognize the presence of such packages but will not interact with them. However, there is a "preview" configuration option, pip_interop_enabled, that enables such interaction (see Conda v4.6 Release Notes). You could either
Set this option globally:
conda config --set pip_interop_enabled true
conda remove --name myEnv keras
If you have PyPI packages generally, then this should help improve your env stability, but at the cost of slightly longer solve times, since now Conda will account for packages coming from PyPI.
Temporarily turn it on just for this operation
CONDA_PIP_INTEROP_ENABLED=1 conda remove --name myEnv keras
I have created a conda environnmennt
and then pip installed tensorflow using a pip wheel. numpy was installed by pip at same stage.
When trying to install scipy,
conda wants to install numpy in parallel of pip installed numpy....?
How to make various installed be recognized by conda ?
This is what the new configuration option pip_interop_enabled, introduced in Conda v4.6 is for. It is still considered a "preview" feature, but I've had success using it:
conda config --set pip_interop_enabled true
Until this feature is released in earnest, I think it would be wise to limit its use to a per-env-basis by using the --env flag when running the above.
It should be kept in mind that preferring Conda packages is still best practice. A must read in this regard is "Using Pip in a Conda Environment".
I cant seem to install the right version of torch and I cant get fast ai libraries working
I try
Python 3.7
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
Could not find a version that satisfies the requirement torch>=1.1.0 (from torchvision) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
No matching distribution found for torch>=1.1.0 (from torchvision)
I feel like I may of downgraded my gpu when I tried conda install fast ai
and then I tried pip and it couldnt find a file C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\caffe2\python\serialized_test\data\operator_test
I finally got to the point where it said successfully installed six, pillow, and torch but torch is at 0.3 which is incompatiable.
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.1-cp37-cp37m-win_amd64.whl
pip3 install torchvision
expected to install pytorch or fastai nothing seems to work
You may try installing the course by creating a conda environment provided anaconda is already installed in your windows machine.
conda update conda
conda create -n fastai_conda python=3.6
conda activate fastai_conda
conda install fastai pytorch=1.0.0 -c fastai -c pytorch -c conda-forge
Or for installing CPU version you can use the below commands after the environment is created
conda install -c pytorch pytorch-cpu torchvision
conda install -c fastai fastai
You can check if installation went right with this command
python -m fastai.utils.show_install
You may further need to install ipykernel to use the conda environment in your jupyter notebook.For that activate environment and run the following commands:
conda install nb_conda_kernels
python -m ipykernel install --user --name fastai_v1 --display-name "fastai v1"
conda install ipywidgets
We can install tensorflow-transform using pip but how do I install it using Conda?
I have tried using conda install -c anaconda tensorflow-transform and all its variants without result.
A search of Anaconda Cloud shows that tensorflow-transform is not available through any channels on any platform. Moreover, the recommended way to install the package is to use PyPI. However, one can still install the package into a specific Conda env by first activating the env:
conda activate your_env
pip install tensorflow-transform
pip list
conda list
I once install torch 0.1.12, then I remove it, and reinstall it.
How can I remove the 0.1.12 version?
If you install torch 0.1.12 with
conda install pytorch torchvision cuda80 -c soumith,
then just try
conda uninstall pytorch torchvision cuda80 -c soumith.
I tested on my mac and it successfully removed pytorch and all its dependencies, also pytorch 0.1.12 never shows in conda list later.
P.S.: a virtual environment is highly recommended with anaconda.