When I use the command "pip install chromedriver" and checked the directory. It installed a directory named "chromedriver" and only have init.py and pycache inside, rather than a executable file.
Is this because some errors of my environment and how can I fix it?
Isn't the name of the package you want to install rather chromedriver_installer. So try to install chromedriver_installer with pip install chromedriver_installer and see if this works.
Related
I want to install https://github.com/opendoor-labs/pyfin package in windows 10, but no pip installation method is provided in the page. I use vs-code python-3.9.10 and all my libraries are installed in a virtual environment. The git address of all files is https://github.com/opendoor-labs/pyfin.git. but I don't know how to download and install directly to the (venv). Is there any easy way to install and import it to my code? I tried 'pip install pyfin', but it installed other library included in this page : https://pypi.org/project/pyfin/ which is different.
First activate your venv.
(activate it using the .\venv\Scripts\activate command.)
The run pip install git+https://github.com/your/repo
I have Spyder, clean Win10 installation, ver. 4.2.3.
When I run command pip, it gives message:
Note: you may need to restart the kernel to use updated packages.
C:\Users\UserName\AppData\Local\Programs\Spyder\Python\python.exe: No module named pip
I restarted Spyder, Win10, nothing helps.
How to fix it?
Thanks.
(Spyder maintainer here) We don't provide pip in our Windows app to prevent people breaking Spyder by installing any kind of packages with it.
The best way to use other packages that don't come with our app is to install Miniconda, create a conda environment after that with the packages you want to use and spyder-kernels, and finally connect Spyder to that env.
If you have python 3.4+ then pip should be installed with python.
To check that, you can run
pip help
in your windows command line.
However, if it isn't the case then download the get-pip.py file and run
python get-pip.py
and the pip installation should start. You can use pip help to verify this.
Another source of the problem might be that pip isn't listed in your PATH variables and thus isn't recognized by your command line.
I'm running a fresh installed OctoPi image (0.18.0). I added pip to my PATH in .bashrc file and sourced it but when I try to run pip I'm getting -bash: pip: command not found error.
When I run /home/pi/oprint/bin/pip, pip is working properly.
My path:
pi#octopi:~ $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/home/pi/oprint/bin/pip:
You added the full path of the executable to the path, but you're only supposed to add the directory of the executable. Every exectuable of said directory is then directly available without the directory prefix.
In other words .. instead of /home/pi/oprint/bin/pip you should add /home/pi/oprint/bin/ to the path.
I always recommend using the Python executable to locate the pip executable for you. This way, you know the right version of pip is being used to install packages that are compliant with your Python version.
$ python -m pip install <the_package_you_want>
It is really easy to end up with mismatched versions otherwise!
I'm facing a problem with socketio. I imported it into my programme by command:
import socketio
Wen I typped pip freeze I got:
python-socketio==4.5.1
Then I ran programme by typing into console:
myfile.py --mode "mode"
But it says:
ModuleNotFoundError: No module named 'socketio'
Any ideas how to fix it?
It happens when you have multiple version of pip install on your system.
you can deal with this problem by creating a virtual environment and again loading the socket-io library.
Install pipenv.
pip install pipenv
Then change directory to the folder containing your Python project and initiate Pipenv,
cd your_project
pipenv install
This will build two new files in your project directory, Pipfile and Pipfile.lock, and a new virtual environment for your project, if it doesn't already exist. If you add the —two or —three flags to the last command above, your project will be initialized with the use of Python 2 or 3. Otherwise, Python's default version will be included.
To install a Python package for your project use the install keyword. For example,
pipenv install beautifulsoup4
and for uninstalling
pipenv uninstall beautifulsoup4
I have just started using python and I have set up python3 to be installed in C:\Python37 dir. I have added python3 path to environment variables. When I run python3 -m pip install [package_name] it installs it in C:\Python37\Lib\site-packages. But when I try to install pylint with python3 -m pip install pylint it prints:
Requirement already satisfied: pylint in c:\users\radio\appdata\roaming\python\python37\site-packages (2.3.1)
It's installing it in above mentioned completely different location, and then VS Code complains how pylint is not installed. Why doesn't pip install it in C:\Python37\Lib\site-packages where it installs all the other packages?
It seems you might have multiple python installations on the computer or you are not running CMD with administrator priviledges when using pip.
I would refer you to this thread: windows pip installing libraries in wrong directory which seems to deal with a problem similar to the one you are having.
I would also try checking the environment variables to see the path set for Python if that doesn't work.