Setup for use with Python virtualenv

main
Jeff Moe 2023-01-29 15:47:16 -07:00
parent 486da519ff
commit 8f3d458af7
5 changed files with 34 additions and 11 deletions

View File

@ -17,10 +17,10 @@ Perhaps do something like this, or set up a Python virtual environment.
``` ```
sudo apt update sudo apt update
sudo apt install git python3-pip sudo apt install git python3-pip python3-virtualenv
pip install --user --upgrade pip
``` ```
## pysalx ## pysalx
The `pysalx` repo contains scripts for interacting with the device. The `pysalx` repo contains scripts for interacting with the device.
Install that too. Install that too.
@ -40,11 +40,19 @@ Get source code with `git`.
The default `requirements.txt` installs a Tensorflow without The default `requirements.txt` installs a Tensorflow without
GPU support. You can edit the `requirements.txt` file to change GPU support. You can edit the `requirements.txt` file to change
which is supported. The "generic" version supports both. which is supported. The "generic" version supports both.
XXX tensorflow not available in pip 2023-01.
## Setup
Thusly.
``` ```
git clone https://spacecruft.org/spacecruft/witzit git clone https://spacecruft.org/spacecruft/witzit
cd witzit/ cd witzit/
pip install --user --upgrade -r requirements.txt virtualenv -p python3 env
source env/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
deactivate
``` ```
@ -186,6 +194,21 @@ same as in `wut`, so makes a good reference.
* https://www.sciencedirect.com/science/article/abs/pii/S1386142521009380 * https://www.sciencedirect.com/science/article/abs/pii/S1386142521009380
*Feature selection of infrared spectra analysis with convolutional neural network* *Feature selection of infrared spectra analysis with convolutional neural network*
# Development
Setup like above, and also:
```
cd witzit/
source env/bin/activate
pip install -r requirements-dev.txt
```
Then before committing new code, make sure it is enprettified:
```
black foo.py
```
# See Also # See Also
@ -214,5 +237,5 @@ Unofficial, unaffiliated with SciAps or Olympus.
# License # License
License: GPLv3 or any later version. License: GPLv3 or any later version.
Copyright (C) 2019-2022, Jeff Moe *Copyright © 2019-2023, Jeff Moe.*

View File

@ -5,6 +5,6 @@ pandas
seaborn seaborn
sklearn sklearn
tensorflow_cpu #tensorflow_cpu
#tensorflow_gpu==2.7.0 #tensorflow_gpu==2.7.0
#tensorflow==2.7.0 #tensorflow==2.7.0

View File

@ -1,8 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/env python3
# #
# witzit-load # witzit-load
# #
# Copyright (C) 2022, Jeff Moe # Copyright (C) 2022, 2023, Jeff Moe
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/env python3
# #
# witzit-plot # witzit-plot
# #
# Copyright (C) 2022, Jeff Moe # Copyright (C) 2022, 2023, Jeff Moe
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,8 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/env python3
# #
# witzit-plot2png # witzit-plot2png
# #
# Copyright (C) 2022, Jeff Moe # Copyright (C) 2022, 2023 Jeff Moe
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by