Unable to execute any conda tasks - python

I'm a rookie in coding so please bear with me. I am currently trying to install tensorflow to work on a project I am doing. In order to do so I need to activate conda. I try to:
Create conda --tf
But received:
\-bash: conda: command not found
I don't know how to proceed from this error code. I thought maybe it was an issue with the environment on my anaconda. Whenever I try to load up anaconda, it takes forever to load the applications and never seems to actually start up. Maybe I need to reinstall anaconda?
Please let me know any advice you may have!
Tried to run various lines of code to try and activate conda including using the specific path name, to no avail.

Related

Unable to install PsychoPy module in Python

I tried to install the psychopy module in python, using Anaconda Prompt and python -m pip install PsychoPy and it gave me error messages I have no idea how to interpret:
enter image description here
followed by a bunch of white text mostly starting with "Requirement already satisfied: [...]" and two other red walls of text "ERROR: Command errored out with exit status 1: [...]" (I can also post pictures of them, if needed)
Additional Info:
I use a Windows 10, Version 21H2, x64-based System
For Python (3.8.8) I use Sypder
Anaconda Navigator is Version 2.0.3
I also have the PsychoPy Standalone (Coder, Runner & Builder) installed (version 2022.2.0)
Any and all help is appreciated!!
Please also tell me if I did this question-thing right, this is my first time posting here and I don't know the etiquette yet
This is not for sure.
Maybe you already solve this problem.
I have experienced some problem of psychopy.
So, I hope this is helpful for you and many other researchers with psychopy.
First, update conda will solve many kind of problems.
'''
conda update --all
'''
Second, In anaconda environment using 'conda' command is recommendation.
In anaconda environment use(except for impossible) 'conda' command is recommended. Generally, mixed use of 'pip' and 'conda' command is not matter. BUT, SOMETIMES, this could occur minor error like this question.
Third, use anaconda virtual environment.
Anaconda provide virtual environment. Initially virtual environment looks confused but, this could safe and secured develop your experiment program.
Lastly, this probelem.
In the middle of your error message. "requires-python>=3.6" <- maybe this means your environment is not appropriate the environment. but your environment is 3.8.8.
For now this is just hypothesis. I think your environment have more than 2 of python could be installed. So, delete all python and reinstall the anaconda and use virtual environment could be safe.
I haven't used this community for a long time so I don't know the etiquette. If I was rude, thank you for your understanding.

How to access CLI from installed Pip/Python venv script

I'm sorry if this is a basic question, but I'm hoping someone can clarify something that may be quite simple.
What I want is to use the tool eyeD3 which is a CLI. The confusing bit is that on the install page it says it should be installed with Pip. Thus, I created a virtual environment and installed the package there.
Okay great, but how do I actually use it now? Because every instruction says to use it as a command line tool. But if it's installed as a pip package then the "eyed3" command is not magically going to be placed in my PATH to be used as intended. So what am I not getting here?
Alternatively I may just download it using sudo dnf install python-eyed3 which should work.
But I really want to educate myself if I'm understanding something wrong, so I can better understand and utilize pip and virtual environments with Python.

Tensorflow installation issues

System information
OS Platform and Distribution - Windows 10
TensorFlow version: latest
Python version: 3.6.4
Installed using virtualenv? pip? conda?: - virtualenv
Greetings,
I hope this is the correct place to submit an inquiry of this nature, if it is not, please forgive my confusion & please point me in the right direction. I greatly appreciate your time & consideration.
I am new to Python & Tensorflow. I've done some coding with C in the past, mostly when I was in college. I am determined to learn Python & to utilize both Python & Tensorflow for AI & Machine Learning purposes.
I've had difficulties in getting Tensorflow to install properly. I started by installing the latest version of Python which didn't seem to like my attempts at installing Tensorflow, I then went with Python 3.6.4-amd64. I installed that, created a fresh directory for my environments, then installed pip & virtual env, then created a virtual environment to setup with Tensorflow.
One of the confusing issues I keep encountering is that when I install pip & virtualenv, and eventually Tensorflow, it keeps sending it by default to C:\user\username\appdata\roaming\python etc, my question is, how do I prevent it from doing that? I am trying to install in the direct being utilized in the command prop, I call up the fresh directory I created for my virtual environment, then activate the virtual environment, and no matter what I do it keeps sending all new install files into the appdata/roaming user directory sub folders.
This is causing the incredibly annoying issue of making it impossible for me to proceed with utilizing Tensorflow because I get nothing but errors on missing files, path directory etc etc. I even tried manually moving some of the files over to the virtual environment directory and that worked in some cases, but did not solve the overall problem.
Okay, now that I've made it painfully apparent how much of an uneducated newbie I am with all of this, may someone please give me some advice. The first step is admitting you need help, and I clearly do as I've spent several hours with my eyes glued to various articles and tutorials that have left me with more questions than answers. I truly appreciate any help you're willing to provide. Just a loner trying to figure this all out & increase my knowledge along the way. Thanks for your time,
Just moving the folder is not enough.
Once you have moved it, you must replace the original with a symbolic link to the new location. This will make windows think the data is still located on your C drive, while it actually is on your D drive.
Do note, this does work with AppData, but not with Program Files nor with the Windows folder, as it will break things like Windows Update.
To create the Directory Junction (Symbolic Link) do the following:
Open a cmd window with administrative privileges.
Navigate to c:\Users\username\appdata
execute the following command: mklink /d local d:\appdata\local
replace d:\appdata\local with the actual path of where you moved the appdata to.
If you cannot move/delete the original copy, create a 2nd user, make it administrator, login with it, and retry the option. This should ensure that no files are in use.
With the above issue fixed, follow the tensorflow installation steps in Anaconda provided here.
Hope this answers your question. Happy Learning.

Trying to install packages with pip properly

This is a very vague question but I am really stuck. I have been working with python for a little bit to try and use some of their functions in opencv (cv2) and other open source libraries. But whenever I try and use pip I will always get an error about improper installation or more commonly when trying to import the installed package idle throws an error that a line of code in the library that is causing an exception. This does not just happen to one library but nearly all of them (I have tried stuff like opencv, tensorflow, urllib). I have tried reinstalling different versions of python (multiple times) and reinstalling it but none of that seems to work. I don't know what to do but really want to be able to use these tools. I use windows 10 and use the default "User" user on admin.
Any help on possible options would be most appreciated!
This was happening to me as well.
In my case I wanted to work with Anaconda and Spyder. I was following some books and tutorials saying how to install stuff with the pip and so on, but it didn't work. What solved it was to install PyCharm and use those same pip functions directly on the PyCharm console (not the windows cmd). Then everything worked automatically and I have whatever library I installed from PyCharm available at Spyder without doing anything else.
Summary:
Get Pycharm -> link
use the same pip install directly in the PyCharm console
A-Hopefully it will work
If it doesn't: Can you elaborate on which IDE are you using? Most likely there is someone here who can help you.

How do I use a Python package from Python package exchange in Pycharm Mac?

Note
I am a beginner in Python and using Pycharm.
The Problem
I am trying to use a project from pypi.org/. I noticed it said pip install "name of project". I did some looking around on the internet and it seems like in order to do that in Pycharm I need to create a Pipenv environment. However, I don't understand how to set this up and how to use it. If I don't need a Pipenv environment what do I need to do instead?
What I've tried
I went to https://www.jetbrains.com/help/pycharm/pipenv.html to try to figure out how to create the Pipenv environment but it wasn't working for me and was also confusing for me.
You can use the Pycharm UI to handle packages as mentioned in their documentation.

Categories