I'm unable to get matplotlib animations to display on a Mac computer. I've chased down several attempts at installing ffmpeg but they've all failed and I'm starting to wonder if that isn't the wrong way to solve the problem.
I found this page.
Since I'm running Python from the Spyder app in Anaconda, the section for this seems relevant. It says
The default python provided in (Ana)Conda is not a framework build.
However, the Conda developers have made it easy to install a framework
build in both the main environment and in Conda envs. To use this
install python.app conda install python.app and use pythonw rather
than python
I'm not perfectly clear on what this means, but I opened a terminal, ran conda install python.app and it seemed to work--at least there were no error messages. I could navigate to a folder that contained the file python.app.
I'm not clear on what it means to "use pythonw" but I navigated to the animation I'm trying to compile and ran $ pythonw anim.py and it gave me an I/O error. I'm not sure if I'm supposed to use pythonw in some other way, or what. If I restart and try to run the code in Spyder I get the same error as before.
I know that the code works, because I've run it on a Linux machine that has ffmpeg and it worked.
Is there something else I need to do to get a framework build, whatever that means?
After installing the framework build, you have to change the location of your python interpreter from python to pythonw. I am not familiar with Spyder, but in VS code I solved this issue modifying the settings.json file from
{
"python.pythonPath": "/Users/[username]/miniconda3/envs/base-evn/bin/python"
}
to
{
"python.pythonPath": "/Users/[username]/miniconda3/envs/base-evn/bin/pythonw"
}
I am using minicoda. For anaconda, the folder in your home directory might be named one of the following:
anaconda2.
anaconda3.
Related
I first installed Spyder and then afterwards Python on a server (with Windows Server 2019) all on the directory C:\Users\wi932. Now I want to use the command prompt to install packages (e.g. tensorflow) but unfortunately I get the error message that "the command pip is either wrongly written or can't be found "(translated). I am wondering why I get this error because on my normal laptop I type in the exact same commands and there everything is okay.
I have attached a screenshot of the command prompt. I tried to install the packages both in the spyder folder ( C:\Users\wi932.spyder-py3) and the Python folder ( C:\Users\wi932\Python\Python310). I always get the same error.
Does anyone of you have an idea what the problem might be and how to fix it? I'll appreciate every comment.
The directory containing pip is located in <Python directory>\Scripts. To make Windows find it, you need to check the "Add Python to PATH" checkbox during installation.
Some packages, including tensorflow, have no version for the last Python distro, so you need to "downgrade" it by installing an older version, for example, 3.8.
Try installing python in local download it at www.python.org then you can run any command with pip directly in local
Problem: I am trying to running my Dummy.robot test script in the terminal via cmd line: robot -d results tests/dummy.robot. However, it is returning the error 'robot' is not recognized as an internal or external command. I sensed that perhaps the robotframework was not properly installed or in the correct directory because the keywords "Open Browser" (see below) was already detected as invalid syntax prior to running.
Troubleshooting Methods:
Checked that both robotframework and robotframework-seleniumlibarary were installed
Installed intellibot on PyCharm and restarted IDE
Made sure I provided the correct path to the script within my project directory as shown below.
Checked that Python 39 and Python39/Scripts was added to my PATH although I am not sure if this is relevant because it just allows me to use pip for installing robotframework later.
Selected the interpreter for this "dummy" project from where that python.exe is located.
Source Screenshots:
File Structure
Run Config & Updated File Structure (3/8/21)
Source Code
Terminal
RF Library Location
I think, going by your terminal pic, it looks like you have a virtual environment: (base). As #TodorMinakov suggested, fire the command pip list in your terminal path (same path as shown in the pic). If Robot Framework libs exist there, then it should be fine. Then try the command python -m robot -d results tests/dummy.robot But if libs are not in the folder, then you have to do pip install for them from Terminal for right installation (which means, your installed libs are in your native directory while you are working in virtual env).
Since you are working with Pycharm IDE, it is better if you could use its terminal instead of using a command line tool such as bash or command prompt. Try this too.
To check if the libs installed are in System Python, you have to go to your folder site packages (eg: C://Python39/Lib/site-packages), you would find all the natively installed libraries here. In case of virtual environment, you have to check in your present directory (where the code exists). There should be a folder by the name venv (or 'base'), which will comprise of the python paths eg: (venv/Lib/site-packages)
I have experienced the same issue and it was a pip versioning issue. It got resolved after installing the upgraded pip version and then reinstalling the robot framework and Appium library. Thanks
Use the terminal in Admin mode.
pip uninstall robotframework
upgrade pip
again pip install robotframework
I have freshly installed python version 3.9 and it shows up in my CMD (command prompt),
but when I try to install django via command
pip install django (also tried sudo doesn't work either)
command line screenshot
but when I try to check my version via
django --version
command line screenshot
I have already tried to configure my environment path variable added every possible path in it.
Environment path variable screenshot
P.S : I don't want to create virtual environment please don't suggest me that the same thing happen's there too. I have been stuck for many days with this problem if anybody actually know how to solve it please help
Let me clear the point that you tried using sudo in your windows machine, I believe that you used Administrator CMD or Administrator Power-shell.
Let's get to the point, from your screenshot it appears you already have the Django library installed in your machine but you are checking django version the wrong way.
You can check the version by using the below command:
python -m django --version
OR
pip freeze
*which will show you all python libraries versions.
please make sure to change python to python3 if this is what you are using, and do the same thing for pip as well
as an optional step you can try to create a project using below command
django-admin startproject testing-project
I hope this help you!, happy coding.
While proceeding Django Project Now, I'm having trouble with linter in VSC, pylint. First I'm using virtual environments with pipenv. and I'm using Visual Studio Code Version 1.19.1 with Windows 10. The trouble that I'm having is even though I installed pylint with pipenv and pip commands, VSC can't recognize it and Installation with Visual Studio Code can't work
First I figured out that python path settings pointed global setting, not virtual envs. so I edit settings.json for VSC like following way.
{
"python.pythonPath": "C:\\Users\\seungjinlee\\AppData\\Local\\lxss\\home\\seungjinlee\\.local\\share\\virtualenvs\\seungjingram-6b3oTnkI\\bin\\python",
}
from
but It didn't work as well.
Is it problem with bash for windows? I guess bash shell create virtual enviorments for Ubuntu. but I'm using editor VSC with windows 10 so it can't find pylint for windows,.,.,, plz help me..!
I had the same problem on Mac OS. I solved it with the next sequence:
$ cd project_directory
$ pipenv install pylint
$ code .
So, the thing is to run VS Code from command line with activated virtual environment. I'm not sure if it helps for Windows, though.
For Windows a workaround may be to specify exact path to pylint in workspace settings:
"python.linting.pylintPath": "C:\\Users\\seungjinlee\\AppData\\Local\\lxss\\home\\seungjinlee\\.local\\share\\virtualenvs\\seungjingram-6b3oTnkI\\bin\\pylint"
I had the same issue. What worked for me was:
Making sure VS Code was using the correct virtual environment by running Python: Select Interpreter from the command palette (Ctrl+Shift+P) and choosing the correct option (it should detect your virtual environment and suggest it, but if not, try setting python.pythonPath as some as suggested, as well as python.venvFolders and/or python.venvPath. Also maybe try creating your virtual environment in the same folder as your project)
Running Python: Select Linter from the command palette and choosing pylint.
And then I still have to sometimes change a character and then save to make it start linting.
Hope this helps.
I encountered the following error message, when I was in python mode.
Error (jedi): Failed to start Jedi EPC server.
*** You may need to run "M-x jedi:install-server". ***
This could solve the problem especially if you haven't run the command yet
since Jedi.el installation or update and if the server complains about
Python module imports.
Then I tried M-x jedi:install-server. Then it complained that
Program named "virtualenv" does not exist
Now from the results I got from google, I added the following line to my emacs.d/init.el file, but still I am getting the same error. Please note that I am using Windows 7
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
Trying to set up jedi in emacs under Windows environment has caused me so much time and trouble already, I just want to complete this once and for all.
Ideally, I am looking for an answer that lists out all the steps I need to setup the virtualenv (on Windows 7) in emacs.
I had the same problem but on Windows 10. I got it working by these steps:
In terminal (cmd/powershell/..):
pip install virtualenv
After that, in emacs:
M-x jedi:install-server
And Emacs could install the server.
FYI, I'm running python3.5, pip version 19.2.3, emacs26.2, W10
I think it is clear that virtualenv is missing. So you need to do
just two things. With this way you don't bother with PATH variable and all
that.
install virtualenv however you feel comfortable, (I use conda package manager for everything python related and have the installation instructions for that, feel free to use pip or whatever)
conda activate yourenv
conda install virtualenv
conda list virtualenv #check if virtualenv is actually installed
Find where the virtualenv is located (as I use conda, I know the files are in bin folder in my installation)
and then show jedi where virtualenv is in emacs C-h v jedi:environment-virtualenv "~/path-to-conda-env/bin/virtualenv"). For more help look in the documentation in Configuration or
comment below.
M-x jedi:install-server in emacs
Test on a .py file.