I am trying to run a code in vs code in virtual env (python=3.9). and I have 2 questions:
1.just recently, the env that I used to work with this code all the time, does not recognize the python packages. I reinstalled the packages and the issue is not solved. I created a new env and installed the packages but it is the same.Any ideas how I can fix this?
Thanks in advance,
I searched for the issues and it seemed reinstalling keras helps, but it didn't for me
Ok thanks you all for your responses. I do not use virtualenv so I did not try that. That issue had happened because I had installed Xcode. I uninstalled it, and reinstalled vscode and created a new env and installed all the packages and the problem is solved.
You can also look in the lower righthand corner to check what version of Python you are using, you can also use cmd+P(Mac) or ctrl+P(Windows) and type > to pull up developer options
Related
first time poster
I am using the Climada modelling tool with Spyder as my IDE of choice through Anaconda. I have created a new environment as per the Climada installation instructions and need to open Spyder to complete the final stages of the installation by running tests. Anyway...onto the problem.
I uninstalled Anaconda earlier, and then did a reinstall. Unfortunately after the reinstall Spyder was not opening in the Navigator, so I tried it through the prompt instead, and received the following message:
Terminal message (apologies, reputation is not high enough to display image)
I think it could be duplicate files leftover in my "AppData\Roaming" folders from my earlier uninstallation of Anaconda that is causing a few issues, but I'm not 100% sure.
Would anyone be able to confirm the problem/provide some help as to what I need to do to overcome this issue? At the moment I'm reluctant to delete any files that may need to be kept
Thanks in advance!
The conda environment for CLIMADA is known to create some issues with Spyder, although I am not sure what the exact problem with your particular issue is.
I can recommend a few things to try (also explained in the docs here):
First step, deinstall spyder in the environment and then:
Install spyder in the conda environment using pip instead of conda
conda activate climada_env
pip install spyder
Install spyder 4 instead of 5
Install spyder in a separate conda environment and configure it to use the climada_env (similarly as recommend by Daniel Althviz).
first time posting on stackoverflow.
So I guess to summarize my problem I should say that I want to do some work with Python's statsmodels. However statsmodels only supports up to Python 3.8 and I am using 3.9. So I need to create a new conda environment. After that I will need to set it up in Spyder.
Um..I am using Windows 10. I also have Python 3.9 installed separately.
I have a few questions to go with this if that is okay.
With Anaconda installed, do I need to install Python? Would that be redundant?
Would having installed Python separately cause issues with conda or with Spyder?
Do I need to reinstall Anaconda?
Do I need to uninstall Python?
After having solved this problem with your help, can the method used to solve this problem (InternalArchiveError) be generalized so if I encounter it again I know what to do?
I have tried the command:
conda clean -a
which did not work and I found from here: InvalidArchiveError when executing conda install notebook
This post addresses InvalidArchiveError for a different problem and the solution worked for someone using Ubuntu. I was hoping for the best in trying it for my setup.
When I do that however I am getting an internal archive error:
The project name is enph_proj, to denote a space where I will do a small time series analysis on a stock with ticker enph
Here is a picture of my 'conda info'. I hope it is helpful
conda info
Thank you all!
Today I come with a two in one set of issues that's on the verge of making me smash my computer to pieces! So please I would greatly appreciate any help as I've been stuck on it for two days now.
I have a project where osmnx is required, so I follow the install instructions provided. Which means that I created a dedicated (clean) environment for it. Within this project there is a notebook that I should run, which leads me to ImportError: No module named dotmap. So I say okay, and install dotmap in the environment through conda install.
Now heres the situation, even though I installed it sucessfully in the environment, I keep getting the same error when I run the notebook! So I think maybe I should reinstall dotmap using pip through conda prompt. But when I use pip install in the dedicated ox environment, I get failed to create process. So I say okay, lets install it again through conda install but it still doesn't work.
I see that the dotmap is being called from a main.py document. So I decide to check the main.py document by installing spyder through anaconda navigtor. Once it's installed I click launch and spyder never launches! I try to launch from the conda prompt and I just get Unable to create process using 'C:\Users\THESIS\.conda\envs\ox2\python.exe C:\Users\THESIS\.conda\envs\ox2\Scripts\spyder-script.py.
At the moment I ran out of ideas of what to do as I tried to work around it numerous times. Before questions get asked (and I hope someone asks something), I'd like to say that I already:
Reinstalled anaconda navigator
Tried created numerous environments in various different ways of installing osmnx and dotmap
Tried reinstalling and launching spyder in numerous different ways (Same thing is happening with Jupyterlab)
And probably some other things that I can not remember now off the top of my head
I know I sound fed up and angry at the moment but I just can not understand how I did not find a solution to this (what should be) simple issue.
All in all, any help is greatly appreciated!!
Following droptop recommendation, I actually just did a full clean (another one) reinstall of anaconda where I deleted almost everything that I could.
I installed it again and it's working now! Thanks for the help anyway!!
Your fresh anaconda install should have jupyter, jupyterlab and spyder in the base environment. Starting the anaconda prompt and typing in jupyter notebook should launch jupyter.
Try activating your ox2 environment with another prompt, and follow through from step 3 of this post https://medium.com/#nrk25693/how-to-add-your-conda-environment-to-your-jupyter-notebook-in-just-4-steps-abeab8b8d084
I'm trying to update/upgrade my Python with conda. I run the command:
conda update conda
but it crashes my Python:
Python has stopped working
A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available.
My installation information is:
conda version : 4.5.2
conda-build version : 3.0.27
python version : 3.6.3.final.0
I googled the issue and got this github issue report. Unfortunately none of the solutions worked for me. I would appreciate if you could help me know what is the problem and how I can solve it.
I tried uninstalling and reinstalling conda and the problem disappeared temporarily. But then the issue happened again while I was trying to use matplotlib.
I experienced the exact same issue one a different machine when running conda update --all so either there is something wrong with conda or I'm making one mistake twice! (conda/python versions were exactly the same as above.)
I tried updating/upgrading all of the packages running the command in this post on admin-cmd. It took a long time to finish and the problem was still there.
There seemed to be issues with Qt. So I tried to uninstall and reinstall Qt and pyqt but it did not solve the problem either.
temporary workaround: I completely uninstalled Anaconda and installed stock Python. So far this has solved the problem both on my home and work computers.
Try conda update --all or if you're trying to update / upgrade specifically python then try conda update python. Faced such problem and it worked for me.
As was suggested by the mods, here I post my temporary solution. Considering that none of the other attempts (reinstalling Qt, Anaconda, updating with pip...) worked, I ended up uninstalling Anaconda and everything pythony and installed the stock / vanilla python from the official website. This has solved the issue so far. Please consider this is not a solution to the problem mentioned above but just to get the python working for the time being.
I'm struggling to understand why Pycharm is not recognizing OpenCV package installed via Conda.
Conda list command
Pycharm package list
I've noticed that a few times before as well but not as much lately. The first thing I would try is to upgrade to the latest version of PyCharm.
You may just want to peruse their forum if that doesn't help, but it sounds more like a bug to me.
PyCharm Support Forum