conda doesn't see the nuitka package - python

When trying to compile a file, using the command conda -m nuitka -onefilestrict test.py
I get an error CommandNotFoundError: No command 'conda nuitka'.
Used conda config --add channels conda-forgeand conda config --set channel_priority strict before installation (conda install nuitka)
When I enter conda search nuitka - I get a lot of packages starting from the 0.5.x to 0.7.7 version.
But when I use - conda list nuitka. I get nothing
conda --version
conda 4.10.3

You seem to have never actually isntalled the package
conda search
lists all packages that you could install that match the given name
conda list
lists the currently installed packages. So you need to do
conda install nuitka

Related

Cannot find package for Python 3.7.8

I am completly new to Conda and I have been struggling for a day without success.
I would like to use the pvtrace module. The documentation specifically says to run the following commands to install the package:
conda create --name pvtrace-env python=3.7.8
conda activate pvtrace-env
conda install Rtree
pip install pvtrace
I have the following error:
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.7.8
I have Anaconda 3 which original Python version is 3.9. I installed the version 3.7, but it did not solve my problem.
Not sure why, but the defaults (main/anaconda) channels are missing specifically the Python 3.7.8 build. This is available through Conda Forge, so, instead try
## one should prefer to list all known package at creation
conda create -n pvtrace-env -c conda-forge python=3.7.8 pip rtree
conda activate pvtrace-env
pip install pvtrace
Alternatively, use a YAML file:
pvtrace-env.yaml
name: pvtrace-env
channels:
- conda-forge
dependencies:
- python=3.7.8
- rtree
- pip
- pip:
- pvtrace
which is used as:
conda env create -n pvtrace-env -f pvtrace-env.yaml

is it any quick way to install package in PyCharm using pip when using conda environment

I am using conda as the Python3 package management tool, sometimes the conda repo did not contains some Python package. So I have to install it using pip, first I found the anaconda environment folder, the next step switch to the anaconda environment folder:
cd /usr/local/anaconda3/envs/pydolphin
then using this command to install package:
./bin/pip install musicbrainzngs
is there any short way to do this? is it possible to install it the PyCharm IDE the simple way? the PyCharm IDE using conda install by default.
First activate your conda environment:
conda activate <env>
This will switch to the version of pip installed in this environment. Then you can install using pip as per normal which will install it into your conda environment:
pip install musicbrainzngs

Installation of Geopandas for Windows 10

There are some problems about geopandas installation for Windows 10 system. You know that this module is including some dependencies into widerange. In this mean, I presented as snapshots my system responses with this dependencies as a summary.
What is the problem?
The error just says it cannot find the file it needs in your Environment Path. Navigate to your cmd terminal and try:
conda install geopandas
Alternatively you can grab the install and all dependencies from the forge:
conda install --channel conda-forge geopandas
It gets easy when you create new environment for it, then start installing. I had followed a lot procedure, downloading wheel files and installing manually but creating the environment and then installing (using Anaconda) make it lot easier.
I have followed this from https://geopandas.org/getting_started/install.html
enter image description here
conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install python=3 geopandas

Problems with python environnements in Anaconda

I have a problem with the management of my environnements on Anaconda. I want to have three environnements, a "classic", another with ortools and a last with django. However, ortools can't be installed by using "conda install ortools", then i have to use pip. My problem is that when i use "pip install --user ortools" in the right environnement it install this package for all my environnements which have the same version of python than the right environnement. How could I fix this ?
Thanks !
#lucidbrot is correct in their comment. You should not use the --user argument in pip, because that will install into your $HOME directory, which every environment can access.
Here is a series of commands you can use to set up multiple environments, one with ortools
conda create --name ortools-env python=3
conda activate ortools-env
python -m pip install --no-cache-dir ortools
python -c "import ortools" # No error.
conda create --name django-env python=3 django
conda activate django-env
python -c "import ortools" # Error: module not found
For reference, the above code uses conda version 4.8.2

How do you conda install a library in an environment created with virtualenv?

I'm working on a (python) project where the choice was to create a virtual environment using virtualenv. However, one of the project dependencies can't be installed through pip on macOS due to this bug: https://github.com/streamlit/streamlit/issues/283
The workaround is to conda install one of the dependencies to bypass the gcc compiler.
How do you conda install something in a virtual environment not created with conda?
I think the easiest approach would be to create a conda env by it's own.
1) Create a requirement.txt file by doing pip freeze > requirements.txt inside your virtualenv environment
2) Create conda env: conda create --name myenv
3) Activate your environment: source activate myenv
4) Install your dependencies: conda install --file requirements.txt
5) Install missing dependecy: conda install YOUR_MISSING_DEPENDENCY
In the accepted answer (upvoted) you can also change point 1) to use conda-installed packages (compatible with subsequent conda install, and excluding pip-installed packages that would be unavailable in conda channels, identified by "pypi" in their extended version names that only conda displays):
conda list --export | grep -v pypi > requirements.txt
And if you still want to use pip, the correct syntax that gets you packages versions list in a format compatible with pip install is now:
pip list --format=freeze > requirements.txt

Categories