Error when installing a python module in Linux - numpy

I am encoutering two kinds of issues while trying to install a package called Boltztrap2.
1) Trying to install Boltztrap2 using 'pip3'. However, when I punch in the command, the process goes smoothly for a while and then spits out an error :
BoltzTraP2/sphere/frontend.cpp:32:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
I did some troubleshooting and found out that it is just a path issue - I confirmed this by typing 'locate Python.h'. However, I don't get how to manually incorporate this change since the 'pip3' command that I use downloads the program and compiles it automatically. I don't seem to have access to change any scripts, or rather I do not know how to, since I'm kind of new to all this.
PS: I do not have sudo access.
2) Trying to install Boltztrap2 by manually compiling the python setup file: This seems to work fine until the system spits out an error saying:
Error:numpy is not installed.
PS: Again, I do not have sudo access.
I would be very glad if someone could help me install this package through either method. I just want to get the software to work. Thanks in advance for any assistance.

python3 -m pip install --upgrade pip
pip3 install numpy
Check if you can upgrade pip?
If that works then you can pip install numpy.

Related

when entering pip install numpy recieved syntax error

new to python and trying to learn some data science, Ive downloaded python 3.8.3 for windows64 two the few things I learned at during the short free trial.
when trying to install numpy I received a syntax error, even though pip was imported and the path is shown.
>>> pip
<module 'pip' from 'C:\\Users\\owner\\AppData\\Local\\Programs\\Python\\Python38\\lib\\site-
packages\\pip\\__init__.py'>
>>> pip install numpy
SyntaxError: invalid syntax
typing python in windows command prompt just brings up the windows store on the python app, and typing pip doesn't find anything as well.
C:\Users\owner>pip
'pip' is not recognized as an internal or external command,
operable program or batch file.
in general, it seems that none of the commands that aren't print() or help() is working.
what did I do wrong?
Make sure that you add Python to System Environment PATH when you are installing python.
If you didn't try this command to add it to your PATH
setx PATH "%PATH%;C:\Python34\Scripts"

ModuleNotFoundError: No module name 'Cython'

I am trying to install pandas module on PyCharm. When i try to install it it gave me this error: "ModuleNotFoundError: No module name 'Cython' " (Screen: https://prnt.sc/qafwcy)
So i went on the CMD to try to install the Cython package with this command: py -m pip install Cython , which gave me an other error: "The script, f2py.exe is install in 'C:\xxx.xxxx, which is not a PATH. (Screen: https://prnt.sc/qafvx3)
Does anyone had the same problem and know how to fix it?
Thank you
Pycharm uses a virtual environment - one separate from your python install on your computer. This is to isolate your development environment from the one you would use on your computer.
Enter your pip commands here instead:

Can you use rmagic (rpy2) in google colaboratory?

I know google colaboratory doesn't yet support an R kernel. What about rmagic? Can I use rpy2?
I tried :
!pip install rpy2==2.8.6
And got :
Collecting rpy2==2.8.6
Using cached https://files.pythonhosted.org/packages/32/54/d102eec14f9cabd0df60682a38bd45c36169a1ec8fb8a690bf436cb6d758/rpy2-2.8.6.tar.gz
Complete output from command python setup.py egg_info:
Error: Tried to guess R's HOME but no command 'R' in the PATH.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3bSiiD/rpy2/
I'm guessing that it isn't working because R isn't installed on whatever cloud machine this notebook is running on, and that it probably isn't possible to install it. But I'm hoping I'm wrong and someone may know of a work around.
OK, I answered my own question. I thought for sure this would fail, but tried anyway:
!apt-get update
!apt-get install r-base
!pip install rpy2==2.8.6
And it worked!

Control Charts in Python Error

I am trying to implement a Shewhart control chart on multiple variables, after looking up packages in Python to implement this I came across SPC and controlcharts. Both are failing to load when code :
pip install spc
pip install controlchart
both come with error code:
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\AppData\Local\Temp\pip-build-xdg2j1zr\spcchart\
All my packages are up to date and I am fearful the age of SPC/ ControlChart are preventing the installation. I am new to python and any help would be appreciated about what error code 1 indicates and where I can find control charts.
You can try this command
pip install python-controlchart
For the second command
There is another package
pip install pyspc

I am failing to install Selenium module via command line

I use Ubuntu 16.10. I tried installing Selenium module of python via the command - sudo pip3 install -U selenium. But, I am not able to install it. It is giving an unexpected error. I am sharing the screenshot of the terminal here. Please help!
Please click here for the screenshot
If you are using Ubuntu, I'd suggest checking in the package manager as it may already be there. I'm on Mint and it was already there when I loaded python (2.7 also).