Module Not Getting Installed: pip3 install morphy - python

I want to install the python module morphy on Ubuntu 20.04.2, but I am getting an error.
I tried this:
pip3 install morphy
I got this output:
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uygwfbh3/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uygwfbh3/morphy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-uygwfbh3/morphy/pip-egg-info
cwd: /tmp/pip-install-uygwfbh3/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-uygwfbh3/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It worked on Windows 10 though. My pip3 version is:
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
I tried this too:
pip install morphy
I got this output:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ICmImS/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ICmImS/morphy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lPhE0U
cwd: /tmp/pip-install-ICmImS/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-ICmImS/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
IOError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
It is clear from the output that the README.md file is missing from the package. What should I do?

Looks like the Linux version of the package might be broken and it doesn't seem to be maintained anymore.
You can use the following workaround:
try installing again but tell pip not to clean up the temporary files: pip install morphy --no-clean
enter the temporary directory with the package contents - find its name in the output from the pip install command
create the files setup.py needs
execute python setup.py install manually
if you know what this package's requirements are, install them manually
$ pip install morphy --no-clean
Collecting morphy
Using cached morphy-0.2.tar.gz (9.3 kB)
ERROR: Command errored out with exit status 1:
command: /home/user/env/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vluz3ja_/morphy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vluz3ja_/morphy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-vluz3ja_/morphy/pip-egg-info
cwd: /tmp/pip-install-vluz3ja_/morphy/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vluz3ja_/morphy/setup.py", line 3, in <module>
with open('README.md', 'r') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
$ cd /tmp/pip-install-vluz3ja_/morphy
$ touch README.md
$ touch requirements.txt
$ python setup.py install
...
Installed /home/user/env/lib/python3.8/site-packages/morphy-0.2-py3.8.egg
Processing dependencies for morphy==0.2
Finished processing dependencies for morphy==0.2

Related

Python3-pip wont install package

I tried to install the turtle-package for python3 via pip. But it just returns an error. I recently switched to xubuntu and I am not sure what to do. Any help??
pip install turtle
The output I get is:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wewhl4kt/turtle/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wewhl4kt/turtle/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ota0vbai
cwd: /tmp/pip-install-wewhl4kt/turtle/
Complete output (6 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wewhl4kt/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
If you want to install the PythonTurtle package, then from the PyPI website the command to write is
pip install PythonTurtle
or
python3 -m pip install --user PythonTurtle
PythonTurtle
It looks like the package you're downloading is broken. The maintainer of the project has probably abandoned the project. Are you sure that this is the package you want to be installing?

Error installing h5pyViewer by pip install h5pyViewer

I am trying to install h5pyViewer using pip install h5pyViewer but it is giving an error.
Collecting h5pyViewer Using cached h5pyViewer-0.0.1.6.tar.gz (74 kB) ERROR: Command errored out with exit status 1: command: /home/madhur/miniconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9tb86g5b cwd: /tmp/pip-install-kx4npfnx/h5pyviewer/ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py", line 82 print ':'+ver+':'+gitcmt+':' ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(':'+ver+':'+gitcmt+':')? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Python version is 3.8.2
pip version is 20.2.4
Ubuntu 20.04.2 LTS
h5pyViewer 0.0.1.6 was released to PyPI at Nov 5, 2015. The code is obviously Python2-only. The problem was fixed in the git repository in commit 5229b39 at Nov 12, 2018.
Unfortunately it's still not compatible with Python3 due to octal 0755 and other compatibility problems. The bottom line: it's still Python2-only.
There is a fork updated for Python 3. You can try it:
pip install git+https://github.com/Eothred/h5pyViewer.git

benchmark installation error, ModuleNotFoundError: No module named 'main'

Why this error? I can't install the benchmark anymore. I need to import 'get_data' which contains inside the benchmark. Whats wrong?
pip install benchmark
Collecting benchmark
Using cached benchmark-0.1.5.tar.gz (7.1 kB)
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py'"'"'; __file__='"'"'/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-pip-egg-info-_7t1tj64
cwd: /private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/setup.py", line 3, in <module>
from benchmark import __VERSION__
File "/private/var/folders/cf/gs10w86j2n1bf2_x86gmqscw0000gn/T/pip-install-qq5kp9hk/benchmark/benchmark/__init__.py", line 10, in <module>
from main import BenchmarkProgram, main
ModuleNotFoundError: No module named 'main'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
benchmark is not compatible with python versions >= 3.
You need python 2.
In a virtual environment with python 3
~/workspace/so via 🐍 v3.8.5 via C python3
❯ pip install benchmark
Collecting benchmark
Downloading benchmark-0.1.5.tar.gz (7.1 kB)
ERROR: Command errored out with exit status 1:
command: /home/louis/miniconda3/envs/python3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-wyj1c1sn/benchmark/setup.py'"'"'; __file__='"'"'/tmp/pip-install-wyj1c1sn/benchmark/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0qo4nmp7
cwd: /tmp/pip-install-wyj1c1sn/benchmark/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-wyj1c1sn/benchmark/setup.py", line 3, in <module>
from benchmark import __VERSION__
File "/tmp/pip-install-wyj1c1sn/benchmark/benchmark/__init__.py", line 10, in <module>
from main import BenchmarkProgram, main
ModuleNotFoundError: No module named 'main'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
With python 2 :
~/workspace/so via 🐍 v2.7.18 :: Anaconda, Inc. via C python2
❯ pip install benchmark
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting benchmark
Using cached https://files.pythonhosted.org/packages/e9/af/e0390a38d8d8920a189775102d69fa19107c0b67f75c7934bc166e05d504/benchmark-0.1.5.tar.gz
Building wheels for collected packages: benchmark
Building wheel for benchmark (setup.py) ... done
Created wheel for benchmark: filename=benchmark-0.1.5-cp27-none-any.whl size=6336 sha256=e4878032c29d27e51067deb70363bf7b7108fa93f9458befabfbbcce3b3d4598
Stored in directory: /home/louis/snap/codium/common/.cache/pip/wheels/a4/3f/24/d0ed8ae3351441f06a4a17a6ea3f5c500527144a9aebfbb05c
Successfully built benchmark
Installing collected packages: benchmark
Successfully installed benchmark-0.1.5

Problems with pip or pip3 install requirements.txt what I should to do to fix this error?

I run into the error below when running either command lines;
# Using pip
pip install requirements.txt
# Using pip3
pip3 install requirements.txt
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-evkbiocv/poster/setup.py'"'"'; file='"'"'/tmp/pip-install-evkbiocv/poster/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-evkbiocv/poster/pip-egg-info
cwd: /tmp/pip-install-evkbiocv/poster/
Complete output (10 lines):
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-install-evkbiocv/poster/setup.py", line 2, in
import poster
File "/tmp/pip-install-evkbiocv/poster/poster/init.py", line 29, in
import poster.streaminghttp
File "/tmp/pip-install-evkbiocv/poster/poster/streaminghttp.py", line 61
print "send:", repr(value)
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`
What am I doing wrong and how can I fix it?
poster — the latest version was released in 2011. Obviously the package is for Python 2 and abandoned.
For HTTP use requests.

Why am I getting an "ERROR Command errored out with exit status 1" when installing the ratfun package for python 3.6?

I am trying to install the ratfun package for python 3.6 with
pip3.6 install ratfun
but am getting the ERROR shown in code down below.
Doing
sudo pip3.6 install ratfun
or updating setuptools
pip3.6 install --upgrade pip setuptools wheel
doesn't help. I am using the latest version of pip3.6.
From other threads I understood that
ERROR: Command errored out with exit status 1:
can in general be linked to some denied permissions, but I don't know how to fix it. Thanks for any ideas!
I am using macOS 10.15.2
Downloading ratfun-2.6.tar.gz (56 kB)
|████████████████████████████████| 56 kB 1.2 MB/s
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/setup.py'"'"'; __file__='"'"'/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/pip-egg-info
cwd: /private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tokenize.py", line 452, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/nc/bzf21l914zq832bjwd5lc4wh0000gn/T/pip-install-7zqss5yi/ratfun/setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```
The package really doesn't have setup.py. It's not a pip-installable package. You can download it, unpack and try to run python clnum_setup.py install. But please note the package was last released in 2009 so I'd not expect it to run with Python 3. Try Python 2.7.

Categories