Upgrade pip install on Win10 box - pypi

I'm trying to upgrade pip install to 22.3. I keep getting this error, "default to user install because normal sit-packages is not writeable."
I'm at the cmd prompt in win10 trying to install.
This came about because I'm trying to install pypdf2 and this won't install to python that's in my environment path. So I'm stumped.
Thanks for any help.

Unfortunately, I just uninstalled conda & the vanilla python. I reinstalled just plain python for now.
I think originally I did not use venv properly and maybe my conda & vanilla pythons could have been mixed? Not sure. But my vanilla 3.11 is working now and I do some more work.
Thanks for the help.

You can try to install it with the --user flag, which will install it to your user directory instead of the system directory. This is not recommended, but it will work.
pip install --user pypdf2

Related

Tensorflow-Text in Miniconda

I am trying to install tensorflow-text through miniconda in Spyder. I have managed to install other modules in Spyder such as tensorflow itself, pandas, scikit-learn, etc. However, using the same command as all the other installations (with the specific package name replaced by tensorflow-text)
conda install spyder-kernels tensorflow-text -y
I continue to get the same error whenever I try to install tensorflow-text:
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-text
followed by a suggestion to search for the package on anaconda.org. As such, I searched for the tensorflow-text package on the anaconda site and found one, albeit for linux, by rocketce. Attempting to run the commands listed under the tensorflow-text installation instructions on that webpage also yielded the same error.
At first, I tried to install tensorflow-text through pip and was able to successfully run the command
pip install -U tensorflow-text==2.10.0
which seemed to install tensorflow-text. But I could not figure out how to access it or if it was correctly installed. Specifically, I am looking to use tensorflow-text in the Spyder IDE. I was able to get tensorflow working in the IDE, but not the specific tensorflow-text.
I am using a Windows 10 system; I could not find anything on the anaconda site for Windows 10. I am rather inexperienced (if you could not already tell from the nature and description of the problem), so patience and clear explanations are appreciated. Thanks in advance!

No module named tensorflow even after installing with pip

I'm trying to follow this guide to test this new algorithm: https://github.com/lalonderodney/SegCaps
I can't do it in my PC, so i'm using another server with Putty. Now I'm connected with the other server.
First of all I installed TensorFlow as indicates in the guide with :
pip install -r requirements.txt
After I wrote this code: ./main.py segcaps.png
in which segcaps.png is the image that i want to use
Finally I wrote python main.py --data_root_dir data
that is the only required parameter with the directory containing imgs and masks folders.
Now it gives me an error:
ModuleNotFoundError: No module named 'tensorflow.python.framework'
I searched it in the directory tensorflow/python/framework and it exists.
So, i don't know how to solve it. Ideas?
If you have multiple Python versions installed, then you'll (most likely) have multiple pip versions installed too. Make sure that the pip command you use installs the package(s) into the Python version you want it to. It may so happen that the package got installed into python2 but you wanted it in python3.
Since using pip did not install the packages in python3, pip3 is most likely to the PyPI for python3. Try
pip3 install -r requirements.txt
and that should work.
In case you have an EnvironmentError you can try this (bad idea):
pip3 install -r requirements.txt --user
This solves the problem most of the times on standalone machines. I'm not sure about the server; insufficient permissions might block this.
Why is the --user flag a bad idea? Read: What is the purpose “pip install --user …”?
You can use pip show tensorflow to see if it is installed or not.
As for ModuleNotFoundError try uninstalling keras and reinstalling an earlier version by pip install keras==2.1.6

How can I do pip install or same thing similar in terminal for Jython to install packages

I have just installed jython and want to install some packages like bs4 and mechanize in python I simply did pip install and done. How I can do the same thing for jython I tried jip install package_name but got an error. Please give the answer as simple as possible to follow thanks in advance.

Downloading PostgreSQL Mac Download Error

could you please advise me of a solution you may know for downloading PostgreSQL. I am trying to install 9.6.5 version, but also tried the 10.0, same error.
I am using an installation option for Mac operating system OS Sierra from website: https://www.openscg.com/bigsql/postgresql/installers.jsp/
I am getting an error:
Have tried to run the instruction sudo easy_install pip in the command line and it installs the pip file successfully. However I am still unable to install the PostgreSQL.
Please could you advise what the issue may be?
I have also installed Homebrew (it did not help).
I do already have anaconda and Python installed, as well as latest versions of R and RStudio.
I have now found a solution to the above problem (on Mac). Execute the following command in your terminal:
sudo easy_install-2.6 pip
If that does not work execute:
sudo easy_install-2.7 pip
This allows the PostgreSQL to be downloaded correctly.
I followed the instructions suggesting using easy_install-2.7 but still got an error very similar to that from the OP. I had to specifically install pip 9.0.0 with
sudo easy_install-2.7 pip=9.0.0
after which the PostgreSQL install worked.
The default pip is now v10, so it's probably a string compare issue in the installer.
Here is the solution that worked for me on Mac High Sierra 10.13.4:
Clear out the brew cache $ rm -rf ~/Library/Caches/Homebrew
Clear out the site-packages $ sudo rm -rf /usr/local/lib/python2.7/site-packages
Reinstall Python $ brew reinstall python This pulls down python-3.5.6.high_sierra and put it in /usr/local/bin/python3
But which python still shows /usr/bin/python
The solution is to run $ brew install python#2 which pulls down python#2-2.7.14_3.high_sierra
Now which python shows the correct path /usr/local/bin/python which is also where all your pip stuff is installed, so now pip will work.
Ensure the latest version of pip is installed with $ sudo pip install --upgrade pip

Installing gdal-config on my linux

I search the entire net could not find a guide to get gdal-config.
I have yum but yum does not have gdal-config, i already installed gdal.
I just need to be able to do this on shell - gdal-config and not get a command not found error.
My distro is Fedora. I don't have apt-get.
You probaby have "yum" instead of "apt-get" on Fedora. Try..
yum install gdal gdal-devel
I'm running Ubuntu 16.04, so I use apt-get instead of Yum. But I had trouble with gdal and gdal-develop. This is command that worked for me:
sudo apt-get install gdal-bin libgdal-dev
I found the package names from here:
https://launchpad.net/ubuntu/+source/gdal
I had a similar problem, that is "gdal-config" was missing. I could solve it by installing the development packages. So you could try installing gdal-dev.
As far as I know, the GDAL utilities, including gdal-config, are part of the download package that you can find here: http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries. They link to a Fedora version. If you installed apt-get, you could find it by looking for GDAL directly.