I'm trying to run this repository from Github, in order to work on it. I downloaded the files but i keep getting the error 'no module named pyttrex' (pyttrex is the name of the repository).
I tried to install it using pip (pip install pyttrex) but pip didn't even find the module, after that i tried with pip install git+https://github.com/icoprimers/pyttrex, but i got the error Command "python setup.py egg_info" failed with error code 1, although setuptools is upgraded. I have two versions of python installed: 2.7 and 3.6, i just can't see the error.
By default pip install pyttrex installs packages from PyPI. There is no pyttrex at PyPI — URL https://pypi.python.org/pypi/pyttrex returns error 404 — hence pip cannot install it.
At Github repository there is no setup.py. Resume — the repo is not a package and isn't pip-installable. Your best bet is to clone the repository and copy subdirectory pyttrex manually to site-packages.
Related
Hi I am trying to install win10toast and I get this message:
I had this error when I tried to download pywin32 previously, but why is this error popping up whenever I try to install any other package? I used to be able to install packages fine before with the same command
pywin32 is listed as a requirement for the package win10toast (link). So, when you are installing win10toast, pip also tries to install pywin32 which gives you an error.
From the looks of it, you are using a python 3.6 and a 32-bit system, both of which are supported by the latest release (pywin32 302). To resolve the pywin32 error, you could try the following.
Option 1: Considering there are multiple installs and python3 is mapped to python 3.6 installation. (You can check that using python --version)
Install using python -m pip install pypiwin32
If you had a prior successful install on pypiwin32, you could actually try to use: python Scripts/pywin32_postinstall.py -install
Option 2: Download the binary files and install - https://github.com/mhammond/pywin32/releases/tag/b302
Download the appropriate exe and install
Option 3: Download the source files and build:
Download the zip file from: https://github.com/mhammond/pywin32/releases/tag/b302
Unzip the file
Use the command python setup.py install
Update:
I was looking around the pywin32 github repo and found that the same issue is encountered by others too. While an official update is not rolled out, you can try the solution there:
you need to download the wheel found here
Install the whl manually using the command: python -m pip install C:/some-dir/pywin32-302.1-cp36-cp36m-win32.whl
I'm deploying some custom packages with pip straight from my company's private git repo (and it's awesome). But what if I want to install a specific version of my package?
This question completements Specify extras_require with pip install -e.
I'm trying to install it with:
pip install git+https://github.com/user/project.git#egg=project==0.0.1[extra]
But I get a ERROR: Invalid requirement: 'project==0.0.1[extra]' message.
Thanks!
Easy enough:
pip install git+https://github.com/user/project.git#v0.0.1#egg=project[extra]
Of course, assuming version 0.0.1 exists.
If your project is in a subfolder:
pip install "git+https://github.com/user/project.git#v0.0.1#egg=project[extra]&subdirectory=my_subprojects/subproject"
From the documentation
I am completely overwhelmed with installing Python3 and Pip.
After running brew install Python3 it seems like Python3 was successfully installed.
Now I tried to run Scrapy again but this error occurs:
-bash: /usr/local/bin/scrapy: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
I guess because the Python version changed?
So I tried to uninstall Scrapy which needs pip.
Here comes the next issue - after installing pip like explained here (https://pip.pypa.io/en/stable/installing/#install-pip) I see this error:
Clms:~ userName$ python3 -m pip install -U --force-reinstall pip
Collecting pip
Using cached pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
WARNING: The scripts pip, pip3 and pip3.7 are installed in '/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.0.2
I truly have no idea how to fix that mess.
Googled for hours, tried a lot but could not figure out to resolve this situation.
Most explanations I encounter require more knowledge about this topic and one leads to the other.
I would be highly grateful for a rescue!
Thanks!
First, you're running the program with python 2.7 not with python 3.x
To run the python on python 3.x use
python3 program.py
Second, regarding the warning. It means the path of the pip is not added to the environment variable PATH. Means you can't call pip from any location, you need to go to its root path to call pip.
Run the below command to update the environment variable PATH to include the root path of pip.
export PATH=/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin:$PATH
This change is temporary. Depends on your OS, different process you need to follow to permanently update environment variable PATH
when i am installing some module like pdfinterp with pip command gives below error please share any solution.
Could not find a version that satisfies the requirement pip (from versions: )
No matching distribution found for pip
From what I understand of your question, you are trying to install the pdfinterp module, which is a part of the pdfminer package.
So, to properly install pdfinterp, you would need to run:
sudo -H pip install pdfminer
However, pdfminer is only for Python2.7! You don't specify in your question, but if you are using Python3.6, you would need to run:
sudo -H pip3 install pdfminer3k
Which downloads pdfminer3k, a "Python 3 port of pdfminer" which should mean your pdfinterp module should be downloaded with.
Hope it helps!
EDIT
Before we begin, try upgrading your pip package by running:
pip install --upgrade pip
(Or python -m pip install --upgrade pip on Windows)
This will ensure your pip packages are up-to-date.
Then, according to errors reported on the pip GitHub repo concerning pdfminer, you should be able to run the install explained in the original answer above. The reason this error is occurring for you is because at one time PEP 440 was having issues with the declaration of "prerelease detection logic":
I'm guessing pip was confused by the old N[.N]+ spelling in the PEP,
that got clarified in recent editions to N(.N)*. SOURCE
This should fix the issue, if you still have problems comment below with the error it returns and we can go from there!
Here is some additional information about the issue that was raised in error #1555 of PyPa pip's GitHub Repo.
As a side note, my machine is running the most recent version of pip and is fully functioning with pdfminer and pdfminer3k!
I am going through the Learn Python the Hard Way, 2nd Edition book, and I am stuck on this problem: "Use your setup.py to install your own module and make sure it works, then use pip to uninstall it."
If I type
setup.py install
in the command line, I can install the module.
But when I type
pip uninstall setup.py
it says:
Cannot uninstall requirement setup.py, not installed
The pip package index says, http://pypi.python.org/pypi/pip, says:
pip is able to uninstall most installed packages with pip uninstall package-name.
Known exceptions include pure-distutils packages installed with python setup.py install >(such packages leave behind no metadata allowing determination of what files were >installed)
Is there another way to install my module that pip will recognize?
By the way, I'm using a windows computer. Just wanted to mention that in case there are different solutions for Windows, Linux, and Mac.
You're giving pip a Python file and not a package name, so it doesn't know what to do. If you want pip to remove it, try providing the name of the package this setup.py file is actually part of.
There are some good suggestions in this related thread:
python setup.py uninstall