I've installed Git Bash and I'm using python which was installed via Anaconda.
I've already activated the environment within the Conda prompt and when I open Git Bash and type python, I get an error (see image below) but when I add add Anaconda3/python it works like a charm (see same image).
Error
But I get a warning even tho I've used activate conda base in the conda prompt.
Any ideas on how to fix this?
Thanks in advance.
Related
I am trying to start conda in Linux, when I want to add zsh which is the terminal it sends me that error and I can't continue. Does anyone know how I can fix this. I already tried with
conda deactivate
conda activate Test1
and still the same error. enter image description here
Resolve the problem
I updated jupyter and conda, then after opening jupyter lab, when I tried to open a notebook, I got an error of below. The file was working fine without any error before.
Unreadable Notebook: U:\Data\test.ipynb TypeError("__init__() got an unexpected keyword argument 'capture_validation_error'")
the same file can be opened in other pc with old enviroment. not sure what is the problem?
Thanks for your help
I fixed it by using python3.9. I use a conda environment to handle the versioning.
Create an environment with python3.9
conda create -n myenvpython39 python=3.9
Activate the environment
conda activate myenvpython39
Install jupyterlab within myenvpython39
conda install -c conda-forge jupyterlab
For a project I made a virtual environment (venv) using Python3. I installed all the necessary dependencies using a simple bash script (see picture below) after I activated my venv. (I verified the installed packages using: pip3 list and concluded that every dependency was installed succesfully.)
My project uses snakemake, so I ran this snakemake commando:
snakemake --snakefile Snakefile.py all
I get this error:
I know it has to do something with the venv, because without the venv snakemake runs perfectly. I have read the Snakemake installation documents and it says I have to install conda and make & activate a conda venv. But, I do not have the sudo privileges to download and install conda (I work on a protected server).
What is happening and does someone know a fix?
One possible reason could be the difference in Python versions. What version of Python does the pip3 prepare environment for?
As I can see from the picture provided, the invalid syntax may be because of the version of Python doesn't support f-strings.
Imagine the following two scenarios: when you run Snakemake manually, you use the latest Python3 (e.g. 3.9). But if the pip3 is configured for an older version (e.g. 3.5), you can configure a very different environment for Python3.5 that doesn't support f-strings.
I am new to conda and mac (i mostly use Ubuntu and pip). Is there a conda shell on mac (I guess I read somewhere that there is none).
If that is the case, how am I suppose to run command like:
conda env create -f environment.yml
as asked here: https://github.com/datitran/face2face-demo
I opened Anaconda Navigator then > Environment > Create > import > and in Specification File gave path of above environment.yml file.
Is the above step correct?
Is there a way to do this via shell in Mac? (I am using macOS Catalina Version 10.15.3)
I am not a Mac user, but I think you can run anaconda commands directly from the terminal, just like in Ubuntu. There's no anaconda prompt in Mac.
I was having the same problem. I opened the Anaconda Navigator program. I clicked on "Environments." Under the working environment, I clicked the right arrow and one of the options was "Open Terminal." When the terminal opened using this sequence, I was able to use the conda commands. Like you I am using Mac OS Catalina.
if in case you have clicked no during conda installation when it asked if it should be added to path or you just can't access it on your terminal for any other reason:
Run this conda update anaconda-navigator in your terminal.
But most likely it won't work because you don't have access of conda in your shell. What you have to do is run one at time the following steps in your terminal.
1st:
nano ~/.bash_profile
2nd:
export PATH=/usr/local/anaconda3/bin:$PATH
3rd:
source ~/.bash_profile
Then try:
conda
And finally make sure you exited your anaconda navigator, then run this:
conda update anaconda-navigator
This should do it, but if in case don't work out try to install homebrew in your Mac then repeat the steps.
On installing anaconda on mac it may install conda in the zsh shell. So you may want to test starting the zsh.
$ zsh
and it should start the terminal with the (base)
(base)$ conda --version
Never hurts to double check.
I cannot install Spyder through Anaconda Navigator. I am a complete beginner when it comes to Python and I have no idea what's going wrong.
I have to create a new environment and open a project there.
What I did so far is: through Anaconda Navigator (1.9.7) I created a new environment (with Python 3.6). Then, for this specific environment I try to install Spyder. I click the 'install' button, a progress bar appears and then nothing happens.
I tried the same steps on friend's laptop and when I click install there, the progress bar also appears. When it's done the 'install' button changes to 'launch'. The only difference that I see between our computers is that I have Windows10 and he has a Macbook. I don't know whether this could be the problem somehow.
How can I install Spyder for a specific environment? What's going wrong with my installation in Anaconda Navigator?
Also, when I try to install Spyder through Anaconda Prompt (with Administrator privileges), I get the following error:
Preparing transaction: done
Verifying transaction: done
Executing transaction: failed
ERROR conda.core.link:_execute(568): An error occurred while installing package 'defaults::openssl-1.1.1b-he774522_1'.
PermissionError(13, 'Permission denied')
Attempting to roll back.
Rolling back transaction: done
[Errno 13] Permission denied: 'C:\\Users\\eweli\\Anaconda3\\envs\\HAABSA\\Library\\bin\\libssl-1_1-x64.dll'
I managed to solve this by going to the directory where the file libssl-1_1-x64.dll is located (in your case, C:\Users\eweli\Anaconda3\envs\HAABSA\Library\bin\). Then, I removed the file (by cutting and pasting it to the desktop, just to be safe) and ran the installation command again in an Anaconda prompt (with admin rights):
conda install -c anaconda spyder
After that, the installation went smoothly and a new version of libssl-1_1-x64.dll was created in the corresponding directory (thus I deleted the one I moved previously).
To install spyder, go to the command line and to the directory where you work. Activate your virtual environment by typing
conda activate environment_name
Then once that returns just type
conda install spyder
This should install spyder in your virtual environment.
I had the same issue today, and weirdly a lot of versions didn't work out for me. However, what worked was to go to anaconda prompt, activate the environment and then type
conda install -c conda-forge spyder
Go the directory of your environement in terminal and type :
conda install -c anaconda spyder
it worked well for me.