![]() ![]() Summary: A built-package format for Python. This can be a way to double-check where things will be installed if it isn't obvious from which pip. You can check to see where pip/ pip3 is installing stuff by checking where a specific package was installed. usr/local/bin/pip: symbolic link to that the pip for your native installation of Python 3.8 is probably called pip3. (In my case, I have a couple of versions of Python installed with homebrew, which likes to symlink things into /usr/local/bin.) Example (base) ~ $ which python It's always possible that the pip in your search path is actually a symlink, so it's worth checking this with file -h $(which pip). If you want to install to native Python, you'll probably have to run conda deactivate before you start running pip commands. On MacOS or Linux, you can do this by running which python or which pip before you start installing things. The easiest way is to make sure that you're using the right pip. Then run conda activate mynewenv whenever you want to use Python 3.8 with ffmpeg installed.) How to install packages in the right place with pip Use the right copy of pip (Bear in mind that creating a new installation of Python 3.8 with ffmpeg installed is as easy as conda create -n mynewenv python=3.8 ffmpeg. Unless you need to use two different python installations in the same shell prompt at the same time, your life will be much easier if you just use Anaconda to manage all your environments. If you start messing with site-packages, at a minimum you run the risk of creating a lot of new problems in your dependency tree. The problems you're having are the sorts of problems that virtual environment managers like Anaconda were created to avoid. Is it a good idea to modify site-packages manually? Is it a good idea to merge the two site-packages directories? And if it's a good idea: What is the best way to let native Python 3.8 and Anaconda (which obviously uses Python 3.7) use the same site-packages directory?.How can I tell pip to use the native Python directory to install new packages?.Is it save to just copy the directories ffmpeg and ffmpeg-1.4.dist-info from the anaconda directory to the native directory?.opt/anaconda3/lib/python3.7/site-packages (1.4)īut obviously native Pythons wants to have it in the other path. Now I did get this message: Requirement already satisfied: ffmpeg in. I rebooted my Mac, but the script still couldn't find it. ![]() But when I wanted to run my script, it couldn't find ffmpeg. Today I needed to install a new package to be used in a native Python script. Now, if your environment is active, you will see the environment name in. ![]() Run the following code to activate your newly installed Python version: conda activate p圓8. Now we need to activate our environment for the libraries to properly load. Some weeks later, in May, I installed Anaconda, but it uses a different path for it's packages: /Users/hubert/opt/anaconda3/lib/python3.7/site-packages/ Create a new environment by running the following code: conda create -n p圓8 python3.8 anaconda. I am using macOS X and I installed native Python 3.8 in April, and the packages of this version are stored in: /Users/hubert/Library/Python/3.8/lib/python/site-packages/ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |