I am trying to create a python environment on a server that is not connected to the public internet, so i have downloaded and transfered all the neccessary packages to the server and trying to install with the following command python3 -m pip install --no-index --find-links=opt/executor/xxx/ packagename
So my question is that when i try to install python-dateutil-2.7.5.tar.gz
im getting the below output saying that setuptools is not installed even though it is installed.
Would you know how i can fix this issue?
Python 3.6.13 is installed on a linux machine
[root#cdddd xx]# python3 -m pip install --no-index --find-links=opt/executor/xxx/ python-dateutil-2.7.5.tar.gz
Looking in links: opt/executor/xxx/
Processing ./python-dateutil-2.7.5.tar.gz
Installing build dependencies ... error
Complete output from command /usr/local/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5h9rus9 --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links opt/executor/xxx/ -- setuptools>=38.2.5 wheel:
Looking in links: opt/executor/xxx/
Collecting setuptools>=38.2.5
Url 'opt/executor/xxx/' is ignored. It is either a non-existing path or lacks a specific scheme.
Could not find a version that satisfies the requirement setuptools>=38.2.5 (from versions: )
No matching distribution found for setuptools>=38.2.5
----------------------------------------
Command "/usr/local/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5h9rus9 --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links opt/executor/xxx/ -- setuptools>=38.2.5 wheel" failed with error code 1 in None
Setuptool install
[root#ddd7 xx]# python3 -m pip install --no-index --find-links=opt/executor/xxx/ setuptools-38.2.5.zip
Looking in links: opt/executor/xxx/
Processing ./setuptools-38.2.5.zip
Installing collected packages: setuptools
Found existing installation: setuptools 38.2.5
Uninstalling setuptools-38.2.5:
Successfully uninstalled setuptools-38.2.5
Running setup.py install for setuptools ... done
Successfully installed setuptools-38.2.5
Related
ERROR [4/5] RUN pip install --no-cache-dir --upgrade -r /charts/requirements.txt
[4/5] RUN pip install --no-cache-dir --upgrade -r /charts/requirements.txt:
#0 1.873 Processing /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-103/six-1.15.0-py2.py3-none-any.whl
#0 1.883 ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/python3/python3-103/six-1.15.0-py2.py3-none-any.whl'
#0 1.883
#0 2.135 WARNING: You are using pip version 22.0.4; however, version 23.0 is available.
#0 2.135 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
I already tried to upgrade pip3 with /usr/local/bin/python -m pip install --upgrade pip
but i get this other error
WARNING: The directory '/Users/josuenavarro/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Requirement already satisfied: pip in ./ambiente_charts/lib/python3.8/site-packages (23.0)
Your docker build logs show that its referencing a resource that should only ever exist in macOS (/AppleInternal/BuildRoot/Library...)
Make sure that you aren't copying your system python or python libraries from your host into your docker build (i.e. copying your local virtualenv).
I am trying install scipy in FreeBSD 13. I have built python 3.10 on FreebSD 13 and managed to install pandas, matplotlib and numpy on a virtual environment which has python 3.10. However, when I try to install sklearn or scipy I get an error saying scipy could not be installed.
Here it is below for when doing pip install scipy. I get the same error more or less when trying to install sklearn.
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy, which is required to install pyproject.toml-based projects
Command errored out with exit status 1: /home/schroter/.pymain/dataViz/bin/python3 /tmp/pip-standalone-pip-d3nnvp2f/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xp_669rf/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'oldest-supported-numpy; python_version!='"'"'3.7'"'"' or platform_machine=='"'"'aarch64'"'"' or platform_system=='"'"'AIX'"'"' or platform_python_implementation == '"'"'PyPy'"'"'' 'numpy==1.14.6; python_version=='"'"'3.7'"'"' and platform_machine!='"'"'aarch64'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'scipy>=1.1.0' Check the logs for full command output.
My pip list is as below:
(dataViz) schroter#SCHROTER:~ % pip list
Package Version
---------------- -------
cycler 0.11.0
kiwisolver 1.1.0
matplotlib 3.4.3
numpy 1.21.4
pandas 1.3.4
Pillow 8.4.0
pip 21.3.1
pyparsing 3.0.6
python-dateutil 2.8.2
pytz 2021.3
semantic-version 2.8.5
setuptools 58.5.3
setuptools-rust 0.12.1
six 1.16.0
toml 0.10.2
wheel 0.37.0
Would anyone be able to help me in this regards please?
Thanks & Best Regards
Schroter
Reuse system package
# install system-wide version in site-packages
doas pkg install py38-scipy-1.8.0
# create a virtualenv with site-packages included
python -m venv --system-site-packages .venv
Drawback is you'll get all packages from site-packages, however you can tackle that by
doas pkg install py38-scipy-1.8.0
python -m venv .venv
YOUR_PYTHON_VERSION= SET IT HERE
ln -s $(python -c 'import lxml, os.path; print(os.path.dirname(lxml.__file__)') ./.venv/lib/$YOUR_PYTHON_VERSION/site-packages
borrowed from https://stackoverflow.com/a/13719417
Regular Installation (TODO)
Haven't figured out it yet, but maybe someone else will, so putting here 2 links which might be helpful
https://forums.freebsd.org/threads/python-scipy-with-python3-x-on-freebsd-11.59009/
https://reviews.freebsd.org/D23447
Have you tried to install scipy from freebsd ports? The freebsd ports contain patches to make the code compile on FreeBSD.
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\vignesh\appdata\local\programs\python\python38\python.exe' 'c:\users\vignesh\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Vignesh\AppData\Local\Temp\pip-build-env-9opljrjo\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
Try to run
pip install --upgrade setuptools
Then
pip install --upgrade chatterbot
If that doesn't work then check if you are using 32 bit Python. Spacy has dropped support for 32 bit and so you'll need to use 64 bit Python.
I am trying to install the twint library into a conda virtual environment. I have to use pip because the library is not at the conda or conda forge channels. twint requires Python 3.6, so I created a new virtual environment with that version. I created that environment following Anaconda's instructions:
conda create --name py36 python=3.6
Again following Anaconda's instructions, I install pip to that environment. A weird thing, I believe, happens here, which is that I am told pip is already installed.
MacBook-Pro-89:~ Zack$ conda install -n py36 pip
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........
# All requested packages already installed.
# packages in environment at /Users/Zack/anaconda/envs/py36:
#
pip 20.0.2 py_2 conda-forge
Whether I check my pip version (which -a pip) from the py36 environment or not, I am shown the following:
(py36) MacBook-Pro-89:~ Zack$ which -a pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip
If I try to install twint, it errors out at multidict. The error message is very long, so below I show the top and bottom, which shows something about Python 3.5.
ERROR: Command errored out with exit status 1:
command: /Users/Zack/anaconda/bin/python /Users/Zack/anaconda/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/56/sdxbs4_x1xlgyb_9vg9mkn300000gn/T/pip-build-env-exnpi3i_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'pip>=18' 'setuptools>=40' wheel
cwd: None
[DELETED BY ME FOR THIS ANSWER]
ERROR: Command errored out with exit status 1: /Users/Zack/anaconda/bin/python /Users/Zack/anaconda/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/56/sdxbs4_x1xlgyb_9vg9mkn300000gn/T/pip-build-env-exnpi3i_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'pip>=18' 'setuptools>=40' wheel Check the logs for full command output.
I have tried with pip3 as well, same error.
I have also tried cloning the twint project from github and installing using the requirements file, but I get a similar error to what I'm seeing already:
ERROR: Package 'twint' requires a different Python: 3.5.2 not in '>=3.6.0'
I do not think it is a PYTHONPATH issue, as I don't believe I ever set it.
MacBook-Pro-89:~ Zack$ echo $PYTHONPATH
MacBook-Pro-89:~ Zack$ source activate py36
(py36) MacBook-Pro-89:~ Zack$ echo $PYTHONPATH
(py36) MacBook-Pro-89:~ Zack$
I am pretty sure that I do not have pip in the py36 environment I created, which somehow means it tries using Python 3.5. What I don't understand is that I do have pip in a py35 environment I created. I also do not have this problem on a remote desktop I use, where again pip does exist in the Python 3.6 environment. So there is something funky going on with my py36 environment on my laptop.
Based on the helpful comments below, I have tried the following but also to no avail. See the comments for my responses.
install -y python=3.6 pip conda
which pip
/Users/Zack/anaconda/bin/pip
python -m pip twint
/Users/Zack/anaconda/envs/py36/bin/python: No module named pip
I am using a 2016 Macbook Pro with OS X El Capitan. xcode is updated.
What am I doing wrong?!?! Why won't this work?!?!
I see you are having troubles installing pip. An alternative way of installing pip is through get-pip.py
https://pip.pypa.io/en/stable/installing/
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Now you can use pip install
python -m pip install pip --upgrade
python -m pip install twint
I am running a Pyhon3 script that depends on OpenSSL and it depends on OpenSSL. However, I am having problems installing it.
# pip3 install pyOpenSSL
Downloading/unpacking pyOpenSSL
Downloading pyOpenSSL-17.4.0-py2.py3-none-any.whl (52kB): 52kB downloaded
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/lib/python3/dist-packages (from pyOpenSSL)
Downloading/unpacking cryptography>=1.9 (from pyOpenSSL)
Downloading cryptography-2.1.3.tar.gz (441kB): 441kB downloaded
Running setup.py (path:/tmp/pip-build-ljoosnix/cryptography/setup.py) egg_info for package cryptography
error in cryptography setup command: Invalid environment marker: python_version < '3'
Complete output from command python setup.py egg_info:
error in cryptography setup command: Invalid environment marker: python_version < '3'
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-ljoosnix/cryptography
Storing debug log for failure in /root/.pip/pip.log
I'm not sure what that "Invalid environment marker" means. Does it mean I can't install this for Python 3?
This is for a Debian 8 VM.
Try to run sudo apt-get install libssl-dev
Upd:
Try to run sudo pip3 install --upgrade pip